Overcome caching limitation when you call a snippet inside another snippet
Uncached snippets might put a big load on you server. To solve this problem we'll have to create a new snippet and make use of runSnippet() API.
<?php $parentparent = $modx->runSnippet("ParentParent"); $wayfinderOutput = $modx->runSnippet("Wayfinder", array('startId' => $parentparent)); return $wayfinderOutput; ?>
Because Wayfinder does not know how to get the second level parent ID of the current document, I had to create my own snippet: ParentParent. You can download this snippet here.
For readability sake, I saved the output of the ParentParent into a variable and then used it in the Wayfider call.
Not so hard! Leave a message if you know other solutions.