[pmwiki-users] Wikified action lists

Bronwyn Boltwood arndis at gmail.com
Tue Aug 2 20:59:43 CDT 2005


On 8/2/05, Hans <design at flutesong.fsnet.co.uk> wrote:

> Translations work now on wiki pages as in html template. the above I would try to write as:
> 
> *[[RecentChanges?action=rss| $[XML Feed] $[for] {$Group} ]]
> *[[Site.AllRecentChanges?action=rss| $[XML Feed] $[of] $[All Recent
> Changes] ]]
> *[[PmWiki.AboutFeeds| $[What's an XML feed?] ]]

I knew about $[] working in wikipages; my difficulties were coming
from phrases that need to be translated as a whole, but that contain
variables.  I've been using
http://www.pmwiki.org/wiki/PmWiki/XLPageTemplate as a source for
already-translated phrases.  I wasn't sure just how literal the XLPage
doohickey is.  After a little more experimentation, it looks like
$[this is a {$VariableContaining} phrase] is the way to do it.
 
> class=navlist would be applied in the template to
> 
> <div class=navlist><!--wiki:$SiteGroup.FeedSnippet--></div>
> 
> or wherever you load/include the wiki page in the template.

Normally I'd argue that this is not the same as putting the class on
the <ul>, but (1) I already figured out how to put the class on the
<ul>, and (2) after some checking, I see that for my purposes, I could
put the class on the div instead with little fuss.

> With (:if :)conditional markup one can show/hide portions of action links easily.

True, and I'm using a mix of that and stylesheets.  It's not worth the
time to research and fiddle with it right now, because I've already
got a pretty good solution.  Maybe later...

> What is missing from the example above is a variable substitution for $SiteGroup, i.e. we don't have  a {$SiteGroup} like we have a {$Group} to put into wiki pages in links etc.

Um...we do, actually, according to
http://www.pmwiki.org/wiki/PmWiki/MarkupVariables. :)
 
> And I don't know how to provide the necessary hooks for marking the current action, which is used for styling tabs in skins. I have stayed away from that problem since I am not too keen on tabs for actions.

I suspect that styling an <a> tag through wikistyles (not by
surrounding it with <span>, I'm afraid) is not a common enough need
for Pm to make it possible.  I can't remember precisely why I switched
from id'ing <li>s to <a>s, but I'm quite sure that it fixed some
tricky problems.  Until I can do it, that's an action list that can't
live in the wiki.
 
> I like to stress again, from lots of feedback I received, that very important reasons for using wikipages to configure action links etc. is the ease of customisation and of creating group specific action pages, or leaving them out for certain groups, or showing action links specific to access privileges. All these seem to me much easier to configure than through html template changes. 

How would you leave out action pages for specific groups?

> Some of this I would not even know how to do via template changes alone. 

The tasks you're listing all need to interact with PmWiki on the fly,
so you couldn't do it through static HTML and CSS.  You could do it
with special code in a skin.php or something.  The wikipages solution
is elegant because it takes advantage of PmWiki's built-in abilities:
including wikipages, using page or group-specific options where
appropriate (group.php, or group.page.php, $group.sidebar, group
footers and headers...), and checking authentication levels.  If
PmWiki didn't have all or some of those abilities, this solution would
not be so compelling.

> How do you show group specific actions, if they can only be defined in the skin template?

Probably only with PHP... I never needed to do that.

Bronwyn




More information about the pmwiki-users mailing list