[pmwiki-users] Feature request: Action lists in skins
Hans
design at flutesong.net
Mon Apr 18 06:42:38 CDT 2005
Sunday, April 17, 2005, 11:49:04 PM, Patrick wrote:
> On Sun, Apr 17, 2005 at 06:20:51PM -0400, Bronwyn Boltwood wrote:
>>
>> But, if Pm could tell me how to add classes or ids to elements through
>> the wiki markup, then I think I'd prefer to store the action lists and
>> so on in wikipages, because most admins will understand how to edit
>> those, and restore the old version if they make a mistake.
> Classes are easy:
> %class=actionedit% [[{$Name}?action=edit]]
> %class=actionview% [[{$Name}?action=browse]]
> In fact, if there's no 'actionedit' or 'actionview' wikistyle defined,
> then 'class=' becomes optional:
> %actionedit% [[{$Name}?action=edit]]
> %actionview% [[{$Name}?action=browse]]
Good. But one problem is how to pass on styling based on which action
is selected for the page. If I use an unordered list of action links
on a wiki page like
* %browse% [[{$Name}?action=browse | Browse]]
* %edit% [[{$Name}?action=edit | Edit]]
then I get the html:
<div id='tabs'><ul>
<li><span class='browse' ><a class='wikilink' href='...?action=browse'>Browse</a> </span></li>
<li><span class='edit' ><a class='wikilink' href='.....?action=edit'>Edit</a> </span></li>
.....
i.e. <span>-elements, but I would like <li class=browse><a ...>...
which I could style with
#tabs li.$action { .... }
in the template for highlighted action tabs.
#tabs span.$action { .... } does not work,
nor #tabs li span.$action { .... }
since the tabs are css styled list elements.
I guess there is a solution which does not involve %browse% type class
definitions on the wiki page, but gives the list element styling via
a php switch, which could be in the skin.php.
Any ideas?
Best,
~Hans
More information about the pmwiki-users
mailing list