[pmwiki-users] Conditional Statement and Relative page references

carlos.ab at gmail.com carlos.ab at gmail.com
Mon Nov 5 20:28:29 CST 2007


Em Segunda 05 Novembro 2007 23:00, DaveG escreveu:
> > Correct.  Essentially PmWiki treats only "bare" page references
> > as self-links ... anything with ?action= or any other query parameter
> > is not treated as a self-link.
>
> In that case, we probably should not even apply the selflink style to
> action links. As it stands now we're applying a contextually incorrect
> style.
>
> > IIRC, this was the behavior decided upon after a fair amount of
> > discussion by many on the mailing list, so it's not likely to
> > change.
>
> At first glance, I don't think the current behavior is 'right', but I'll
> check out the old posts.

You can also do something like this in skin.php:

if( $action == "browse" )
	$HTMLStylesFmt['actionhigh'] = $ActionHi['Browse'];
if( $action == "edit" )
	$HTMLStylesFmt['actionhigh'] = $ActionHi['Edit'];
if( $action == "diff" )
	$HTMLStylesFmt['actionhigh'] = $ActionHi['Diff'];

...

and every action in Site.PageActions there is a class defined:

* %item rel=nofollow class=browse    accesskey='$[ak_view]'%      
[[{*$FullName}               | $[View] ]]
* %item rel=nofollow class=edit      accesskey='$[ak_edit]'%      
[[{*$FullName}?action=edit   | $[Edit] ]]
* %item rel=nofollow class=diff      accesskey='$[ak_history]'%   
[[{*$FullName}?action=diff   | $[History] ]]

...

That's it.

CarlosAB



More information about the pmwiki-users mailing list