• MODX.com

    1,368 downloads

findParent

findParent is an extra by dinocorn, first released on 2012-01-24.

Package Description

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

Usage/Installation Instructions

Simply install via Packet Manager

Details

Developer(s)
dinocorn
Released
2012-01-24
First seen
2012-01-24
License
GPLv2
Supported databases
MySQL
Minimum MODX Requirement
2.1

findParent Releases

Vendor Signature Released on
MODX.com 0.4.2-pl 2012-01-24 (6 years ago)