Want to retrieve folder path to descendant navon

For a current navon I can use the

$user.psoFolders.getParentFolderPath($sys.assemblyitem) or $user.psoFolders.getParentFolderPath($sys.item.guid)

to get the folder path to the current item.

I want to do this (in a limited way) to retrieve the folder path for a descendant navon from within the current one (specifically to automate a section of the site nicely). I’m not well enough advanced with the templating to work out how to get the assemblyitem or guid of a descendant navon and would greatly appreciate any pointers you can provide!

Thanks…

Assuming you have the node for this Navon (I’m not sure how you’re finding it), you can just use $node.Guid (or $node.getGuid()) to find the GUID.

Getting the Assembly Item is a bit more complex, as you have to clone the existing assembly item and then call setNode(). Look at the source for the #slot macros for hints as to how to do this.

If all you want is the parent path (and the item appears in exactly one folder), using the GUID is good enough

Dave

Thanks Dave, that worked a treat.