Project:Automatic Nodetitles
Version:6.x-1.2
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Issue tags:auto nodetitles conditional tokens

Issue Summary

I'm wondering if there is a possibility of some kind of conditional part of a token.

Example:
CCK field how_many

Title preset [title-raw]-[how-many]-[singular[how-many]:book][plural[how-many]:books]
or
Title preset [title-raw]-[how-many]-book[plural[how-many]:s]

Maybe we should talk about tokens and conditions in a different place, maybe in a different layer, above module... but I'm sure that this support here would be very helpfull.

Comments

#1

You can do this with custom theming but your suggestion would make achieving this much easier.

#2

If someone makes a patch for that, It would also be nice to have [if exists[token] ]. Often I want to include all fields that may be blank, and while can do php it gets annoying.

#3

+

#4

I would also be very interested in simular functionality.
In my case at hand, I would like to put the word "and" in between two CCK fields, but only if the second field has a value.

E.g.: [field_date1-view] and [field_date2-view]

If there is a solution possible already, I would really appreciate a hint.

nobody click here