[pmwiki-users] self-links: Better check including "action"?

Petko Yotov 5ko at 5ko.fr
Sun May 15 09:54:16 CDT 2011


On Sunday 15 May 2011 16:42:05, Oliver Betz wrote :
> Petko Yotov wrote:
> >> http://www.pmwiki.org/wiki/Cookbook/TrackingMenu shows (at the end of
> >> the page) how to avoid self-links.
> >> 
> >> But this breaks the default "view" action.
> >> 
> >> I can add "action=browse" to the action link, but wouldn't it be
> >> better PmWiki recognised the ?action part, too?
> >
> >Something like this?
> >
> >  if($action == "browse")
> >    $LinkPageSelfFmt = "<span class='selflink'>\$LinkText</span>";
> 
> yes, that's the suggestion from Cookbook/TrackingMenu I mentioned. If
> I use it, the "View" action doesn't work anymore even if the current
> action is not "browse", because PmWiki outputs it as selflink.

On that page there is no "if($action == "browse")". When you add if($action == 
"browse") the self-link is only removed if the action is "browse". If you 
"edit" the page, you'll see a link (without any action part, ie. to "browse").

Petko



More information about the pmwiki-users mailing list