[pmwiki-users] Option List for All Groups

Patrick R. Michaud pmichaud at pobox.com
Thu Dec 28 10:19:59 CST 2006


On Thu, Dec 28, 2006 at 01:26:11AM -1000, Sivakatirswami wrote:
> I am trying to get an select-option input list to show
> all the groups in the wiki.
> 
> If I put this in the  form:
> 
> : (:select name="Project":)
> (:pagelist group=-Pmwiki,-Site,-Staff,-TODO* name=-RecentChanges 
> fmt="#selectlistgroups":)
> (:selectend:)
> 
> And this in Site.LocalTemplates:
> 
> !!!fmt=#selectlistgroups
> 
> A simple list of select options.
> 
> [@
> [[#selectlistgroups]]
> (:option value="{=$Group}":)(:keep {=$Group}:)
> [[#selectlistgroupsend]]
> @]
> 
> it almost works: but  I get a list that iterates the group
> for every page:

Try the following instead:

    [[#selectlistgroups]]
    (:if ! equal {<$Group} {=$Group}:)
    (:option value="{=$Group}":)(:keep {=$Group}:)
    [[#selectlistgroupsend]]

This outputs an option line only if the group of the
current page is different from the previous one.

Pm




More information about the pmwiki-users mailing list