[pmwiki-users] Fox and PTV to manage categories

Hans design5 at softflow.co.uk
Fri May 15 10:59:03 CDT 2009


Thursday, May 14, 2009, 8:47:13 PM, Nicolas Poulain wrote:

> I did as follows but it dosn't work very well because (and I don't know
> why) the form has to be posted twice to effectively add a new category
> to the PTV.

> ---- GroupHeader -------
> Categories :{{*$FullName}$:cat}
> (:fox form  ptvtarget={*$FullName}:)
> (:input select $:cat "{{*$FullName}$:cat}, [[!A]]" A:)
> (:input select $:cat "{{*$FullName}$:cat}, [[!B]]" B:)
> (:input select $:cat "{{*$FullName}$:cat}, [[!C]]" C:)
> (:input submit post "+":)
> (:foxend form:)
> ------------------------

try

Categories :{{*$FullName}$:cat}

(:fox form  ptvtarget={*$FullName} redirect=1 ptvfields=cat:)
(:input select cat "[[!A]]" A:)
(:input select cat "[[!B]]" B:)
(:input select cat "[[!C]]" C:)
(:input submit post "+":)
(:foxend form:)

using such a select input form lets you assign one category per
page, and change it with the form.
If you need multiple categories, then this won't do it.
You may use  a text input field to display and edit multiple
categories, but then you can't just select them and have to type them.

Also have a look at Cookbook/Taggerfor a more friendly way to handle
multiple categories.


  ~Hans




More information about the pmwiki-users mailing list