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

Tegan Dowling tmdowling at gmail.com
Wed Jun 21 09:15:05 CDT 2006


On 6/20/06, Martin Fick <mogulguy at yahoo.com> wrote:
> --- Steve Perkins <stereosteve at gmail.com> wrote:
> > 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 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]]
>
> Unfortunately, there is no selection box input markup
> yet that I can find, so this example uses radio
> buttons.  It should give you an idea of how to do it,
> and maybe you can make your own selection box markup
> (and let us know how you did it!)
>

Maybe the code behind the (very useful) recipe
http://www.pmwiki.org/wiki/Cookbook/RenamePage would be useful for
some part of the solution - it has a drop-down box pre-populated with
the names of the existing wikigroups, AND the user can create a new
group "Group" just by entering Group/PageName in the field that calls
for the new PageName.




More information about the pmwiki-users mailing list