[pmwiki-users] Wiki trail in template header and footer
DaveG
pmwiki at solidgone.com
Sun Dec 11 21:35:22 CST 2005
Actually it does work -- mostly. A better example is:
http://www.solidgone.com/pmwiki/index.php?n=MKI.OilAndOilFilter
The prev/next links are present. It's the central link which is
missing/wrong.
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).
>
> Based on your other answer, that the trail script knows nothing about
> where it is from within a tmpl file, I'm tending to conclude what I want
> is not possible using my current approach. Anyone have another approach?
>
> ~ ~ Dave
>
> 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
>>
>>
>
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://host.pmichaud.com/mailman/listinfo/pmwiki-users
>
More information about the pmwiki-users
mailing list