[pmwiki-users] $PreviousPage variable?

Martin Fick mogulguy at yahoo.com
Mon Aug 13 11:13:38 CDT 2007


Responding on the list, it is better to keep the
technical stuff here so that others may benefit/help.

--- Sivakatirswami <katir at hindu.org> wrote:
> Martin Fick wrote:
>>
>> You could modify pmwiki to automatically add the
>> current (i.e referring page as a GET value to every
>> single link that pmwiki creates).  Toward the end
of
>> the LinkPage function, add this line:
>>
>> $qf .= $qf ? "&amp;":"?" .
"PreviousPage=$pagename";
... 

> Now I'm realizing I'm missing one increment:
> 
> I'm getting {$PreviousPage}  just fine now... but 
> that is a fullname, which I need, but I also need 
> just the $Group part of that string

You should be able to extend the method to set
$PreviousGroup and $PreviousName if you'd like.  To
get those values inside of the PmWiki function you may
need to use something like:

$group = FmtPageName('$Group', $pagename);
$name = FmtPageName('$Name', $pagename);

see this page for a reference:

http://pmwiki.org/wiki/PmWiki/FmtPageName

This could then become (untested):

 $qf .= $qf ? "&amp;":"?" .
FmtPageName('PreviousPage=$FullName&PreviousGroup=$Group&
PreviousName=$Name");

Then don't forget to define access to those GET
variables like you did for PreviousPage,

-Martin



       
____________________________________________________________________________________
Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games.
http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow  



More information about the pmwiki-users mailing list