For the object name pattern you are not able to have a condition that shows either one (nick) or two (first + last name). You can only have one condition like your example.
So, to solve this you should use template code where you want to display the nick (if set) or the full name. The template code would look something like this:
Thanks Bård. Yes, it has been some time. And now I'm using eZ.. :-)
Too bad that it's not possible to have that condition. But no harm, <nick|first_name> will have to do. My curiosity led me to the question as I didn't want to use the template code to accomplish it.
And André, I would definitely use has_content. Not as messy as Bårds code. :-)
Just would like to support the availability of more advanced syntax in the future versions of eZ. Object names are very useful especially for they are pre-fetched. We could definitely find some interesting uses for more complex pattern rules.
Just would like to support the availability of more advanced syntax in the future versions of eZ. Object names are very useful especially for they are pre-fetched. We could definitely find some interesting uses for more complex pattern rules.
Cheers, Piotrek
I second the request. We have the exact same situation, where we would like to allow the user to have a nick or pen name, but if they don't give one, it falls back to their first_name and last_name, which are two separate fields.
Is this supported yet in eZ Publish? It's 2010 now...
Just would like to support the availability of more advanced syntax in the future versions of eZ. Object names are very useful especially for they are pre-fetched. We could definitely find some interesting uses for more complex pattern rules.
Cheers, Piotrek
I second the request. We have the exact same situation, where we would like to allow the user to have a nick or pen name, but if they don't give one, it falls back to their first_name and last_name, which are two separate fields.
Is this supported yet in eZ Publish? It's 2010 now...
Thanks!
According to http://issues.ez.no/6908, it seems to have been solved, and the syntax is as follows: <nickname|(<firstname> <lastname>)>. I'm about to test it.
You must be logged in to post messages in this topic!