[pmwiki-users] Variable question
    Patrick R. Michaud 
    pmichaud at pobox.com
       
    Tue Apr  5 16:24:14 CDT 2005
    
    
  
On Tue, Apr 05, 2005 at 04:54:50PM -0400, David Spitzley wrote:
> I want to set up a small snippet of code which will set the EditTemplate
> to "Content.CountyTemplate" if the user makes an edit request from
> "Content.MichiganCounties", but I don't know how to check the origin
> page.  Is there a variable which contains the page name and/or group of
> the >referring< page?
Try this:  In local/Content.MichiganCounties.php, place the line 
(apologies in advance for it's length -- such is HTML):
$LinkPageCreateFmt = "<a class='createlinktext' href='\$PageUrl?action=edit&template=Content.CountyTemplate'>\$LinkText</a><a class='createlink' href='\$PageUrl?action=edit&template=Content.CountyTemplate'>?</a>";
This changes the "edit new page" link for Content.MichiganCounties to
automatically include the template= parameter.
If you need something different, let me know.  :-)
Pm
    
    
More information about the pmwiki-users
mailing list