Hello, I have asked and received an answer, but frankly I just don’t understand the answer. It has to be obvious -- I’ve been trying to wrap my thick head around it but just haven’t had any luck.
I am using a snippet to check which page/container I’m on:
if ($file == 'my-page.php' || $container == 'my-container')
{
$tpl = "[[Wayfinder? &startId=`0` &outerTpl=`SideNavigation` &rowTpl=`SideNavigationRows` &titleOfLinks=`longtitle' &includeDocs=`11`]]";
}
return $tpl;
This is actually working, but because of the feedback I got before, I have this feeling that it’s just dumb luck that it
is working.
I know I can’t call MODx tags within php; they don’t know about each other. I need to use an array to call the MODx snippet. In the example I was given:
$modx->runSnippet('snippetName', array('param1'->'value1', ...));
I would come up with something like:
$modx->runSnippet( 'Wayfinder', array('&startId'->'0',...) );
But, that’s just not the right syntax.
Sorry guys... my skull must be really thick on this one.