On each page I want to be able to show the title of the directory, which is the nth one down from the top/ultimate directory.
By doing this, I will be able to show the user which category of content they are currently viewing.
I'm a newbie, and hopefully this is not too hard to acheive, though I couldn't find the answer on the forum. maybe I am using the wrong terms.
Steve
-
☆ A M B ☆
- 24,524 Posts
Check the UltimateParent snippet. That has properties to specify the level.
Hello again,
I'm still stuck on this problem and am hoping that someone might be able to tell me where I am going wrong.
All I can get an output for at the moment is the resouce ID, but I can't seem to get an output for the title of the resource.
Please help.
Stevbe
-
☆ A M B ☆
- 24,524 Posts
Perhaps you need to specify the field you want - &field=`pagetitle`, even though it's supposed to be the default.
I prefer to use the
fastField extra for getting arbitrary fields from arbitrary resources. It provides a new MODx tag, [[#...]]
[[#[[UltimateParent? &topLevel=`1`]].pagetitle]]
Since it's actually an extended version of the default MODx parser class, thus making the new tag part of the MODx parser, it's much faster than a snippet. It only works with version of Revo 2.2.7 or above, since that's the first version that has a setting to select the parser to use.
YES! It worked once I had installed the 'fastfield' plugin.
Many thanks Sottwell.
Steve