[pmwiki-users] In list of links to groups, make current group different style
Sandy
sandy at onebit.ca
Fri Nov 24 16:22:15 CST 2006
Patrick R. Michaud wrote:
> On Fri, Nov 24, 2006 at 02:54:48PM -0500, Sandy wrote:
>> I know it was answered here a while ago. I know it can be done mostly
>> with wiki text, but I can't narrow down the search enough to find it.
>>
>> On my site, the sidebar includes a list of groups, made by hand rather
>> than automated. I would like the link to the group the current page is
>> in to be highlighted.
>
> In your sidebar, give each item in the list its own wikistyle
> keyed by the name of the group:
>
> * %GroupA% [[GroupA/]]
> * %GroupB% [[GroupB/]]
> * %GroupC% [[GroupC/]]
>
> Then, in local/config.php, set the wikistyle corresponding to the current
> group to whatever form of highlighting you want:
>
> $group = PageVar($pagename, '$Group');
> $WikiStyle[$group] = array('apply'=>'item', 'background-color'=>'yellow');
>
> or
>
> $group = PageVar($pagename, '$Group');
> $WikiStyle[$group] = array('apply'=>'item', 'class'=>'highlight');
>
> Pm
That looks like it will do what I want!
(Tegan's way would work if I only wanted it for the group homepages, but
I want Main to be highlighted if I'm in Main.SomePage and Group2 to be
highlighted if I'm in Group.SomePage.)
Thanks!
Sandy
More information about the pmwiki-users
mailing list