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

DaveG pmwiki at solidgone.com
Sun Dec 11 22:21:13 CST 2005


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.

I tried wrapping the <!--markup:... in a function, and also tried the 
MarkupToHTML, even nesting:
<!--function:ShowTrail <!--markup:<<|[[$TrailSource]]|>>-->-->


 > (Also, note that others on this list and other recipes have mentioned
 > using a markup of "(:trail:)"; I don't know if anything came of that.)
I did a quick search of the list. I think the (:trail:) markup was to 
solve a problem where there might be two lists on a page. I saw no 
further discussion, where that was developed.


Patrick R. Michaud wrote:
> On Sun, Dec 11, 2005 at 10:09:53PM -0500, DaveG wrote:
> 
>>>Short answer:
>>>
>>><!--markup:<<|$TrailSource|>>-->
>>
>>Using this doesn't provide the normal trail links, simply text formatted 
>>like a trail (ref the first trail under the "Wiki Sandbox" title: 
>>http://www.solidgone.com/pmwiki/index.php?n=Main.WikiSandbox).
> 
> 
> As far as I can tell the markup is working -- the Main.WikiSandbox
> page isn't on the DIY trial, so no forward and backward links
> are displayed.  If you were to put Main.WikiSandbox on the DIY trail,
> or use the (:trail:) markup on a page that is on the trail, you'd
> see the forward and backward links.
> 
> What are you expecting to see there?
> 
> (Also, note that others on this list and other recipes have mentioned
> using a markup of "(:trail:)"; I don't know if anything came of that.)
> 
> Pm
> 
> 
>>Patrick R. Michaud wrote:
>>
>>>On Sun, Dec 11, 2005 at 03:17:32PM -0500, DaveG wrote:
>>>
>>>
>>>>I may be using this wrongly. Declaring the markup below will create a 
>>>>variable. *How do I reference it in the tmpl?* I tried a few ways, but 
>>>>all failed, so I'm not sure if I'm using the markup incorrectly or 
>>>>referencing incorrectly.
>>>>
>>>>I'm using this markup:
>>>>
>>>>
>>>>>Markup('^trail:', 'directives',
>>>>>  '/^trail:(.*)/e',
>>>>>  "\$GLOBALS['TrailSource']='$1'");
>>>>
>>>>In a wiki-page I put:
>>>> trail:xyz
>>>>
>>>>The output of the page displays "xyz".
>>>>
>>>>I tried referencing using:
>>>> $GLOBAL['TrailSource']
>>>>and
>>>> <!wiki:$GLOBALS['TrailSource']-->
>>>>and
>>>> <!markup:$GLOBALS['TrailSource']-->
>>>
>>>
>>>Short answer:
>>>
>>><!--markup:<<|$TrailSource|>>-->
>>>
>>>Longer answer -- global variables in a template file are
>>>automatically replaced by their value(s).
>>>
>>>Pm
>>>
>>>
>>
> 




More information about the pmwiki-users mailing list