F

findParent

By JP DeVries (dinocorn)


A simple plugin that traverses up a given resource's parent tree searching for a resource with the provided value of a given property or Template Variable. Returns the requested property or Template Variable.

Examples:

Search for an ancestor resource of the current document with a pagetitle of Women's Jackets and return it's id

[[findParent? &id=`[[*id]]` &haystack=`pagetitle` &needle=`Women's Jackets` &return=`id` ]]

Search for an ancestor resource of resource 23 with a forSale Template Variable of true and return it's pagetitle

[[findParent? &id=`23` &haystack=`tv.forSale` &needle=`true` &return=`pagetitle` ]]

Thanks for using findParent!

JP DeVries

mail@devries.jp

JP DeVries


New in findParent 0.4.2

Initial content

More

Information

Released
January 24, 2012
Supported Versions
2.1 – 2.3
Downloads
1,430
License
GPLv2

More from JP DeVries

W
Wool

A typographic crime-stopping snippet for MODX 2.x. View the README…

View
Hits

Hits tracks pagehits with a punch. With hits you can easily counts…

View
QuickBar

Adds an Evo style hover bar to the top of your site for quick editing.…

View
boilerX

Makes HTML5 Boilerplate just a click away and adds some clever settings.

View