[pmwiki-users] SortByScore and Conditional Formatting

Patrick R. Michaud pmichaud at pobox.com
Sat Feb 24 15:45:25 CST 2007


On Fri, Feb 23, 2007 at 10:26:20AM +0000, Francis Casson wrote:
>    1) Has anyone mananged to get Cookbook/SortByScore to work with a version
>    later than 2.2.0 beta17?  

I probably need to take a look at this recipe and see if I can get
it to work.
> 
>    2) Is it possible to use the (:if) directive to differentiate page
>    actions?  e.g. (:if action=edit:)  What is the correct syntax?

(:if action edit:)

>    I want to use conditional formating on the Site.PageActions page to
>    highlight the current action and create a tab system - or is there a
>    better way to be doing this?

Use CSS classes.  For example, in the PmWiki default skin 
each of the items on Site.PageActions is styled by a
css class that matches the name of the action.  

So, to change the styling of the current tab, simply add 
something like the following to local/config.php:

    $HTMLStylesFmt['action'] = " .$action { background-color:#9999ff; } ";

PmWiki will replace $action with the current action (e.g., 'edit',
'browse', 'diff') and the CSS style will change for the corresponding
link.

For example, see http://www.pmwiki.org/wiki/Test/HighlightAction .

Pm




More information about the pmwiki-users mailing list