[pmwiki-users] Fwd: Templates for other actions (was: PmWiki questions...)

The Editor editor at fast.st
Wed Apr 25 11:12:12 CDT 2007


On 4/25/07, Ben Stallings <ben at interdependentweb.com> wrote:
> Pm replied to Dan,
> >> 3) I'm wondering with the new forms processing system Pm is
> >> > developing, just how flexible the following syntax is:
> >> >
> >> > http://www.pmwiki.org/wiki/Cookbook/SimpleRating?action=edit&editform=Cookbook.RecipeInfoForm
> >> >
> >> > That is, can it be used with other actions or only edit? More
> >> > importantly, can it work with ZAP forms?
> >
> > Since I don't understand all of the ins-and-outs of ZAP forms,
> > I can't say what will happen.  All that happens with the editform=
> > parameter is that PmWiki uses the specified page instead of
> > Site.EditForm .
>
> I've been using ZAP forms as EditForms for a couple months now, and they
> work great, but I'm looking forward to being able to use the standard
> Preview and Save and Edit features as well (not to mention Save Draft!),
> once the new form-processing system becomes part of the core.  Right now
> that's the main limitation: you can only Save; Save and Edit is not an
> option because the ZAP form sets action=zap instead of action=edit.
>
> It seems to me that an EditForm works very much like a GroupHeader or
> GroupFooter, though I haven't looked into the workings closely enough to
> see if they're processed exactly the same way.  If that's the case, then
> the mechanism being used in ?editform=Group.Page could be generalized to
> something like ?template=Group.Page that would work with any action, not
> just edit.  For example,
> http://example.com/pmwiki/Group/Page?action=print&template=Group.PrintTemplate
> would format pages in Group differently for printing than the rest of
> the site.
>
> You could then have default template locations for each action, so that
> if there is no Group.EditForm, Site.EditForm will be used, and if
> there's no Group.LocalTemplates then Site.LocalTemplates will be used,
> and so on, much like we can currently do with GroupHeaders and
> GroupFooters.  Then if you wanted to use the default template for an
> action, you wouldn't have to specify the template in the link; you could
> just go ahead and say ?action=print and the proper template would be
> used.  --Ben


Very cool idea!  Second that request!

Cheers,
Dan



More information about the pmwiki-users mailing list