[pmwiki-users] Wikified action lists

Bronwyn Boltwood arndis at gmail.com
Tue Aug 2 22:56:21 CDT 2005


On 8/2/05, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> On Tue, Aug 02, 2005 at 07:32:52PM -0400, Bronwyn Boltwood wrote:
> > HTML generated from the wiki markup above:
> >
> > <ul class='navlist' >
> > <li class='browse' >  <a class='wikilink'
> > href='http://localhost/pmwiki-latest/testing/field.php/Site/CommandTabs?action=browse'>Read
> > Page</a></li>
> > <li class='edit' > <a class='wikilink'
> > href='http://localhost/pmwiki-latest/testing/field.php/Site/CommandTabs?action=edit'>Edit
> > Page</a></li>
> > <li class='diff' > <a class='wikilink'
> > href='http://localhost/pmwiki-latest/testing/field.php/Site/CommandTabs?action=diff'>Page
> > History</a></li>
> > <li class='upload' >  <a target='_blank'  class='wikilink'
> > href='http://localhost/pmwiki-latest/testing/field.php/Site/CommandTabs?action=upload'>Attach
> > file</a></li>
> > <li class='attr' > <a class='wikilink'
> > href='http://localhost/pmwiki-latest/testing/field.php/Site/CommandTabs?action=attr'>Change
> > Attributes</a></li>
> > </ul>
> >
> > The HTML from PmWiki is close, but doesn't function just the same as
> > the hand-coded stuff.  I can't find a way to apply a class or id to
> > the <a> tag through wiki markup, for instance.
> 
> Did you try...?
> 
>    li.edit a { ... }
>    li.diff a { ... }
>    li.upload a { ... }
> 
> Seems pretty straightforward to me.

Ah...no.  That had never occured to me.  Now that I try the selector
"li.$action a" after making the appropriate changes, I find that it
works.  Good grief, I am an idiot not to have thought of that. 
Wikified action lists, here we come.

> > Another thought is that the wiki markup is not much shorter, neater,
> > or easier to understand than the HTML.  That, of course, was one of
> > the main reasons to wikify the action lists: make it easier for new
> > admins to understand.
> 
> That may have been a reason that others were espousing, but I never
> believed that the wiki markup would be shorter, cleaner, or easier to
> understand -- in fact, that's why I was saying "we should just have
> the admin use HTML directly".  The main reasons for wikifying the
> action lists were to take advantage of conditional markups and to
> make it easier for such lists to be used across multiple skins.

Which, having just tried it, works nicely.  Combine with the
Login/Logout recipe for a very stealthy wiki.  I have further revamp
in mind if I can only find a way to do it, so I'm not sending out this
new version of Pukka yet.
 
> Trying to internationalize every possible pagename and phrase can get a
> little unwieldy.  At some point it becomes easier to do $[Site/ActionList]
> and have per-language action lists than it is to have one action list
> and a separate translation for everything in the action list.

Very.  I just wish I could decide where to stop on what to internationalize.

Bronwyn




More information about the pmwiki-users mailing list