Home  Extras  MODx Add-Ons  UltimateParent

UltimateParent



Votes: 6
Tags: Navigation, Menu, snippet
Submitted: May 21, 2009
Released: May 21, 2009
Downloads: 169
License: Public Domain


UltimateParent 1.4-beta1 | Author: splittingred

Works with the following Version(s): Revolution-2.0.0-beta1

UltimateParent 1.4-beta1 for MODx Revolution 2.0-beta-1.


Download


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

Forums Support Thread Votes: 13
Tags: Navigation, Menu, snippet
Submitted: May 19, 2007
Released: May 19, 2007
Downloads: 1278
License: Public Domain
Package Website


UltimateParent 1.3 | Author: sottwell

Works with the following Version(s): 0.9.5

Return the "ultimate" parent of a document.


Download


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

Forums Support Thread Votes: 13
Tags: Navigation, Menu, snippet
Submitted: Sep 17, 2006
Released: Sep 17, 2006
Downloads: 983
License: Public Domain
Package Website


UltimateParent 1.2 | Author: sottwell

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


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

Forums Support Thread Votes: 15
Tags: Navigation, Menu, snippet
Submitted: Jul 2, 2006
Released: Jul 2, 2006
Downloads: 1000
License: Public Domain
Package Website


UltimateParent 1.1 | Author: sottwell

Works with the following Version(s): 0.9.2.1

Return the "ultimate" parent of a document.


Download


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.




Comments

Please login to comment.

Close ]


 
 
 

Contact Us | Team Blog | FAQ | Site Credits

© 2005-2009 the MODx CMS project. All rights reserved. Privacy Policy | Terms of Service