Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
$388 per month—let's make that $500!Learn more
What is siblingNav?¶
siblingNav is a snippet for MODX Revolution which can generate Navigation to Resource-Siblings.
siblingNav was first released on November 10, 2011 and was created by Bruno Perner for BD Creative.
siblingNav was created as a Revolution snippet, and should work on all versions since 2.0.0
Download & Installation¶
Install siblingNav by Package-Management
|rowTpl||snrow||chunk for siblings|
|selfTpl||snself||chunk for active row|
|prevTpl||snprev||chunk for previous-link|
|nextTpl||snnext||chunk for next-link|
|firstTpl||snfirst||chunk for link to first resource|
|lastTpl||snlast||chunk for link to last resource|
|id||modx-recource-id||the resourceid from where to get the siblings|
|parents||false||commaseperated, get siblings from more than one parent|
||JSON-string with resource-fields for sorting|
you can find the default chunk-files here: https://github.com/Bruno17/siblingnav/tree/master/core/components/siblingnav/elements/chunks
Minimum call for getting a navigation with all siblings
Advanced calls for getting a navigation with parents and navigate between childs of multiple parents
[[!siblingNav? &limit=`7` &id=`[[*parent]]` &placeholderPrefix=`snparent.`]] [[+snparent.prev]][[+snparent.prevlinks]][[+snparent.self]][[+snparent.nextlinks]][[+snparent.next]] [[!siblingNav? &limit=`9` &parents=`29,261`]] [[+sn.first]][[+sn.prev]][[+sn.prevlinks]][[+sn.self]][[+sn.nextlinks]][[+sn.next]][[+sn.last]]
You should use firstChildRedirect in parent resources.
Github repository: https://github.com/Bruno17/siblingnav