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

Oliver Betz list_ob at gmx.net
Sun May 15 09:42:05 CDT 2011

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.

As far as I see, PmWiki drops the ?action= part before comparing the
URL to detect whether it's a selflink.

My workaround is to make the "view" action in Site/PageActions not
{*$FullName} but {*$FullName}?action=browse, but IMO that's somewhat

I would prefer if PmWiki detected the different links including the
"action" part. Example:
On http://www.pmwiki.org/wiki/Cookbook/TrackingMenu?action=diff a link
to http://www.pmwiki.org/wiki/Cookbook/TrackingMenu should not be
detected as "Selflink".

The reverse case: On
http://www.pmwiki.org/wiki/Cookbook/TrackingMenu?action=diff the
action link to "diff" _should_ be detected as "Selflink". Currently it

This way it would be simpler to decorate the action links with CSS.
The PHP code e.g. used by Cookbook/MonobookSkin wouldn't be necessary.

Anything I'm missing?


More information about the pmwiki-users mailing list