On Sun, May 15, 2011 at 04:42:05PM +0200, 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>"; > 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 > doesn't. > > 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?
I can't tell from the above description if you're referring to page links or url addresses. So I'll try to restate the above cases in terms I can cope with. :-) When looking at the history page for the Cookbook.TrackingMenu page, (i.e., ?action=diff), any links in the diff content that are to Cookbook.TrackingMenu *should* be treated as self-links, because the diff output is supposed to show what would be seen when a person is viewing the normal page (and in that case, the link would be a selflink). The "selflink" feature means "refers to the current PmWiki page". It's unrelated to actions. It sounds like you're looking for a way to style "refers to the same url". The "selflink" class isn't intended to be that. I suspect there are ways to do what you're wanting to do without having to introduce a lot of changes to PmWiki's core. Pm _______________________________________________ pmwiki-users mailing list [email protected] http://www.pmichaud.com/mailman/listinfo/pmwiki-users
