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

Martin Fick mogulguy at yahoo.com
Tue Jun 20 23:46:56 CDT 2006


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

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!)

-Martin


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 




More information about the pmwiki-users mailing list