you can dig in the demo examples. That's the best way to learn the template language. Browse through the demo site, identify a view that you want to learn about, turn on template debug to see which templates are being used. You can just copy the examples used there.
Hrrrm, this seems a bit odd that we can easily generate the parent node id, though not the parent node name... I will use a fetch to grab the info, but it seems to me this should be as easy to retrieve as the node id.
Any reason why my belief doesn't make sense?
As always, I appreciate the prompt reply Paul and Karsten!
Alex
Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]
The thing is that parent_node_id is direct attribute for node, i mean it is stored in the same database row, if you want to know the name of parent node you need to fetch it. And there is attribute (so called functional attribute) for node called "parent". So to do what you want, you need to write $node.parent.name.
Thanks Sergiy! Knowing about .parent.name helped me figure out what I was doing wrong!
FYI Karsten, I was actually adapting the "Creating Tree Menus" example (http://www.ez.no/developer/ez_publish_3/documentation/customization/tips_tricks/creating_tree_menus) for my code which is how I came up with the question. I'm trying to ramp up my examining code in general, reading the docs and asking lots of questions (as Paul can attest to).
I'm learning as quickly as possible. :)
Alex
Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]
<i>When in doubt, clear the cache.</i>
You must be logged in to post messages in this topic!