[pmwiki-users] Wiki trail in template header and footer
Patrick R. Michaud
pmichaud at pobox.com
Sun Dec 11 22:28:00 CST 2005
On Sun, Dec 11, 2005 at 11:21:13PM -0500, DaveG wrote:
> Appologies for that -- it works as expected when used on a page that's
> in the trail source. My last problem is to NOT show the trail when
> $GLOBAL["TrailSource"] is not declared.
Okay, this gets a bit tricky.
Set the trail markup as follows:
$TrailSource = '';
Markup('^trail:', 'directives',
'/^trail:(.*)/e',
"PZZ(\$GLOBALS['TrailSource']='<<|$1|>>')");
and then in the template, use
<!--markup:$TrailSource-->
The first line sets $TrailSource to an empty string, in case
there's no (:trail:) markup. The trail markup sets $TrailSource
to be the entire trail markup including the <<|...|>>.
Pm
More information about the pmwiki-users
mailing list