[pmwiki-users] Wiki trail in template header and footer

DaveG pmwiki at solidgone.com
Sun Dec 11 22:47:14 CST 2005


Oh, and just on the off chance that someone actaully makes it all the 
way to the end of this thread, you need to change the markup to include 
[[ ]]:
      Markup('^trail:', 'directives',
        '/^trail:(.*)/e',
        "PZZ(\$GLOBALS['TrailSource']='<<|[[$1]]|>>')");

Patrick R. Michaud wrote:
> 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