[pmwiki-users] Generating an array of all group names.

Marc Cooper gmane at auxbuss.com
Wed Jun 21 05:01:11 CDT 2006


Martin Fick said...
> --- Steve Perkins <stereosteve at gmail.com> wrote:
> > My assignment:
> > I set up a pmWiki for my employers, but the users
> > can't wrap their mind
> > arround making a new page.  I'd like to expand the
> > NewPageForm recipie to
> > have a select box with all of the group names, so
> > they are encouraged to
> > create pages in exisiting groups. (a chosen few 
> > will make new groups)
> > 
> > So, I need to generate a php array of all the group
> > names.  What's the best
> > way?  I looked at the PageList code and the new
> > PageListExtensions recipie.
> 
> What you need is a Pagelist Template, something like
> this:
> 
> [[#radio]]
> (:if equal {<$Group} :)
> (:input form method=get:)
> (:if ! equal {<$Group} {=$Group} :)
> * (:input radio n {=$FullName}:) {=$FullName}
> (:if equal {>$Group} :)
> (:input submit value="Try It":)
> (:input end:)
> (:if:)
> [[#end]]

That's very instructive. Thanks, Martin.

For validation reasons I went with:

  (:input form "{$PageUrl}":)

and also changed to:

  * (:input radio n {=$Group}:) {=$Group}


Now, I'd like to ask a question: how does PmWiki "know" that the radio 
buttons are to be used as URLs?

-- 
Best,
Marc





More information about the pmwiki-users mailing list