I believe that the BreadCrumbs snippet has options to achieve this, but here’s some code:
if ($modx->documentObject['parent'] != 0) {
return $modx->runSnippet('PageTrail');
}
That runs the snippet if document is not on site root. You can add parameters to the PageTrail snippet too if you need, by using:
$modx->runSnippet(’PageTrail’, array("parameter1" => "value", "parameter2" => "value"));
"He can have a lollipop any time he wants to. That's what it means to be a programmer."
why have you added extra = to the conditional?
"He can have a lollipop any time he wants to. That's what it means to be a programmer."