[pmwiki-users] A couple of tweaks to ZAP

The Editor editor at fast.st
Fri Dec 8 12:06:04 CST 2006


Duh, just hit me.  You can do this already with create--using the
pagetemplate to provide the format.  I'm assuming the field names are
going to all be the same, and only the values will change.  Basically
you:

1) setup a zapform with all the appropriate  input fields.

2) use "create" to assign the location of the page you want

3) set up a pagetemplate (like ADL) at a specified location that looks
like this:
(the default location is Group.Name-template)

BEGIN:VCALENDAR
     PRODID:-//RDU Software//NONSGML HandCal//EN
     VERSION:2.0
     BEGIN:VEVENT
     DTSTAMP:{Timestamp}
     DESCRIPTION:{Description}
     CATEGORIES:{Category}
etc...

When you create the page, the template will be retrieved, the field
values will be inserted and the result will be save onto the page.  It
won't technically be in the zap data section, but on the actual page,
but I think that's what you want.

You can put anything you want into the template.  You can also update
the template at any time, but existing entries will not be changed,
only new ones.  Let me know if you get stuck.

The create functon is in the zapfiles module and it is very powerful
for creating new pages.

Cheers,
Caveman




More information about the pmwiki-users mailing list