[pmwiki-users] Wikified action lists

Patrick R. Michaud pmichaud at pobox.com
Tue Aug 2 20:36:11 CDT 2005


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.

> 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.

> The most problematic goals to achieve in wiki markup are:
> - provide the necessary hooks for marking the current action
> -correctly markup text that has variables AND needs to be translated. 
> I was trying to do this for a Site.FeedSnippet page, and just could
> not figure out how to make something as versatile as
> 
> <ul class="navlist">
> <li><a href="$ScriptUrl/$[$Group/RecentChanges]?action=rss">$[XML Feed
> for $Group]</a></li>
> <li><a href="$ScriptUrl/$[$SiteGroup/AllRecentChanges]?action=rss">$[XML
> Feed of All Recent Changes]</a></li>
> <li><a href="$ScriptUrl/$[PmWiki.AboutFeeds]">$[What's an XML feed?]</a></li>
> </ul>

* %list class=navlist% [[RecentChanges?action=rss | $[XML Feed for {$Group}] ]]
* [[$[Site/AllRecentChanges]?action=rss | $[XML Feed for Site] ]]
* [[PmWiki/AboutFeeds | $[What's an XML feed?] ]]

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.

Pm




More information about the pmwiki-users mailing list