UltimateParent
Tags: Navigation, Menu, snippet
Submitted: May 21, 2009
Released: May 21, 2009
Downloads: 169
License: Public Domain
UltimateParent 1.4-beta1
Works with the following Version(s): Revolution-2.0.0-beta1
UltimateParent 1.4-beta1 for MODx Revolution 2.0-beta-1.
Download
- ultimateparent-1.4-beta1.transport.zip (169 downloads)
Description
Travels up the document tree to return the "ultimate" parent of a document. An optional argument in the snippet call can specify a document ID to act as the top of the tree if you don't want to go all the way up to the root. Another argument can specify the document whose parent you want, if this argument is not used the current document's id will be used.
Instructions
Install via Package Management.
Sub-Packages
Previous Releases
1.3
Votes: 13
Tags: Navigation, Menu, snippet
Submitted: May 19, 2007
Released: May 19, 2007
Downloads: 1278
License: Public Domain
Package Website
UltimateParent 1.3
Works with the following Version(s): 0.9.5
Return the "ultimate" parent of a document.
Download
- repo-1478.txt (1278 downloads)
Description
Travels up the document tree to return the "ultimate" parent of a document. An optional argument in the snippet call can specify a document ID to act as the top of the tree if you don't want to go all the way up to the root. Another argument can specify the document whose parent you want, if this argument is not used the current document's id will be used.
Instructions
Copy the text of UltimateParent to a new snippet. Call the snippet with or without the optional arguments:
UltimateParent? &id=`45` &top=`6`
will return the ultimate parent of document 45, below document 6.
UpdatesBug fix to prevent infinite loop if parent never equals $top.
1.2
Votes: 13
Tags: Navigation, Menu, snippet
Submitted: Sep 17, 2006
Released: Sep 17, 2006
Downloads: 983
License: Public Domain
Package Website
UltimateParent 1.2
Works with the following Version(s): 0.9.0 | 0.9.1 | 0.9.2 | 0.9.2.1
Return the "ultimate" parent of a document.
Download
- repo-975.txt (983 downloads)
Description
Travels up the document tree to return the "ultimate" parent of a document. An optional argument in the snippet call can specify a document ID to act as the top of the tree if you don't want to go all the way up to the root. Another argument can specify the document whose parent you want, if this argument is not used the current document's id will be used.
Instructions
Copy the text of UltimateParent to a new snippet. Call the snippet with or without the optional arguments:
UltimateParent? &id=`45` &top=`6`
will return the ultimate parent of document 45, below document 6.
Updates2006-09-17: Fixed bug where the getParent() query would try and use an Array (the entire result row from getParent) instead of the single id column value.
1.1
Votes: 15
Tags: Navigation, Menu, snippet
Submitted: Jul 2, 2006
Released: Jul 2, 2006
Downloads: 1000
License: Public Domain
Package Website
UltimateParent 1.1
Works with the following Version(s): 0.9.2.1
Return the "ultimate" parent of a document.
Download
- repo-645.txt (1000 downloads)
Description
Travels up the document tree to return the "ultimate" parent of a document. An optional argument in the snippet call can specify a document ID to act as the top of the tree if you don't want to go all the way up to the root. Another argument can specify the document whose parent you want, if this argument is not used the current document's id will be used.
Instructions
Copy the text of UltimateParent to a new snippet. Call the snippet with or without the optional arguments:
GetUltimateParent?id=`45`&top=`6`
will return the ultimate parent of document 45, below document 6.

Please login to comment.