[Pmwiki-users] Sidebar Highlighting?

John Rankin john.rankin
Sun Sep 26 15:16:53 CDT 2004


On Monday, 27 September 2004 8:09 AM, Knut Alboldt <mailing at alboldt.de> wrote:
>At 21:25 26.09.2004, you wrote:
>>Hi all,
>>
>>Is there a halfway simple way to highlight the corresponding sidebar
>>entry when a page is open?
>
>For pmwiki1 have a look at
>http://www.pmwiki.org/wiki/Cookbook/IfGroup
>
>Define the Sidebar as follows:
>
>=ifgroup Main %red% [[Main.HomePage Main]]
>=ifnotgroup Main [[Main.HomePage Main]]
>=ifgroup Group1 %blue% [[Group1.HomePage Group 1]]
>=ifnotgroup Group1 %blue% [[Group1.HomePage Group 1]]
>
>%red% and %blue% must be defined as wikistyles.
>
>You can also setup group-depended display of subentries, see
>the examples.
>
>Knut 
>
>
Or, for an effect as shown at
http://www.affinity.co.nz/pmwiki/pmwiki.php/XMLWP/HomePage

note the HomePage in the side bar has a dotted border controlled by css

(as an extra, the links gain tool tips)

The way this works is to look for self-referencing links, ie a page name
that refers to the current page. The script then substitutes a different
$WikiPageExistsFmt, so it always 'just works' everywhere.

If that's what you are after, download the WikiPresentations module
and use just the maori.php and smartquotes.php scripts from
http://www.pmwiki.org/wiki/Cookbook/WikiPresentations

Or you can extract the bit of code that checks for self-referencing
links and use that.

Hope this helps. If you have any questions, let me know.


-- 
JR
--
John Rankin





More information about the pmwiki-users mailing list