Closed (duplicate)
Project:
Date
Version:
7.x-1.x-dev
Component:
Date Field
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
11 Jan 2012 at 21:00 UTC
Updated:
11 Jul 2012 at 15:01 UTC
I am using the Date field and have start and end date.
Currently there is a token for the date field but it lists the start and end date.
I would like to customize the date field to look like 011112, but the date needs to be associated with the field and not the created date.
Another use for this could be a url like events/2012/node-title
Thanks
Comments
Comment #1
sonar_un commentedI have a similar issue where I have a date field with a start and end date. The tokens don't even show for this field unfortunately.
I think what I may have to do is to create another field just for the date I want to use as the token and apply it to all of my entries.
Comment #2
tsvenson commentedDrupal core doesn't come with any date fields. The contrib Token module does only add supports for missing core tokens and improved tools to work with tokens.
If your using a contrib module that provides fields, it is entirely up to the author of that module to also make tokens available for it or not.
Comment #3
kclarkson commented@tsvenson
So are you saying that I should put in a feature request to the maintainers of the Date module ?
I figured token would be the right place.
Comment #4
tsvenson commented@kclarkson Token does come with many date tokens, such as node creation, update, current date and so on. However, if you need to customize data that is provided by a contrib module, such as Date, then it is that module that needs to provide that token.
Token provides APIs for contrib modules to use to both create new tokens for their features or let tokens be used for what the module provides.
Comment #5
kclarkson commentedComment #6
kclarkson commentedComment #7
karens commentedPlease see #1103032: Document how to use date tokens. We are blocked until the Token module gets field tokens working correctly.
Comment #8
mxtAt today, using all the latest DEV version of involved modules, I have now a WORKING token to obtain paths like:
events/2012/my-event-title
The token I use is:
events/[node:field-mydatefield:value:custom:Y]/[node:title]hope this help
Comment #9
sonar_un commentedUnfortunately, this doesn't work for me as it says I am still using invalid tokens.
The Pattern for all Career paths is using the following invalid tokens: [node:field-career-date-token:value:custom:Y].