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

bomarmonk’s picture

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

hefox’s picture

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.

asb’s picture

+

Tino’s picture

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.

gaurav.kapoor’s picture

Issue summary: View changes
Status: Active » Closed (outdated)