Forums / General / Get parent module name

Get parent module name

Author Message

Tony Stark

Wednesday 27 February 2008 9:12:36 am

Hi,

Can anyone explain if it is possible to get the name of the parent folders name? i.e. if you am viewing an item within a folder can I output the name of the folder it belongs to?

so if I have topnode > folder > item

can I output "folder" within the template used for "item"?

Thanks

Tony

Mark Marsiglio

Wednesday 27 February 2008 9:27:47 am

Yes - that is actually stored as an attribute of the current node. You can see all of the attributes by adding

 {$node|attribute(show,2)} 

in your template, where node is your variable, and 2 is the number of levels of depth to go into the object arrays. Increasing it will give you more options, but may kill your server depending on how powerful it is (cause an error). The list can get long quick.

You can also steal code from the breadcrumb nav template in ezwebin to get this info (it uses a different method, using the path array).

http://www.thinkcreative.com
Turning Ideas Into Strategic Solutions