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

sonar_un’s picture

I 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.

tsvenson’s picture

Status: Active » Closed (won't fix)

Drupal 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.

kclarkson’s picture

@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.

tsvenson’s picture

@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.

kclarkson’s picture

Project: Token » Date
Component: Token Actions » Date Field
Status: Closed (won't fix) » Active
kclarkson’s picture

Title: Add Field Date Support for - Month, Day, Year and Time » NEW TOKKEN- Add Field Date Support for - Month, Day, Year and Time
karens’s picture

Status: Active » Closed (duplicate)

Please see #1103032: Document how to use date tokens. We are blocked until the Token module gets field tokens working correctly.

mxt’s picture

At 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

sonar_un’s picture

Unfortunately, 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].