[pmwiki-users] Zap and pagetemplate

Scott Smith smackaysmith at gmail.com
Fri Jun 22 11:26:39 CDT 2007


I'm an idiot. I didn't realize Dan had answered the question on 6/19. Sorry.

The template page looks like this now--

Page Name entered: {$$makepage}
File Name: {$$create}
Some words: {$$txtWords}

The form page looks like this--

(:messages:)
(:zapform:)
(:zap createtemplate="Systems.TestFormTemplate":)
||Create: ||(:input text makepage:)
||Add some text: ||(:input text txtWords:)
|| ||(:input submit:)
(:zap if1="namefmt {makepage} ? create=Systems.{makepage}":)
(:zap if2="! namefmt {makepage} ? warn=Invalid page format. ":)

(:zap create="":)
(:zapend:)

(:if false:)
[[#ID]]
(:messages:)
(:zapform:)
Create: (:input text create:) (:input submit:)
(:zapend:)
[[#ID]]
(:if:)

I didn't realize the template keyword is now 'createtemplate' instead of
pagetemplate. Also, it has to be in double quotes. To get the form info to
appear on the new page, you must use {$$field_name} not {field_name}.

Scott Smith

On 6/22/07, Scott Smith <smackaysmith at gmail.com> wrote:
>
> I'm struggling to get zap to create a page using a template. My ultimate
> goal is to have a zap form filled out and emailed to me. For now, I'll take
> just getting a template page to work with Hello World! displayed.
>
> Stats:
> pmwiki-2.2.0-beta44
> Zap 5/31/07
> Zap Toolbox 5/31/07
>
> Have cut and pasted the test install code: installation successful.
>
> I took the make page markup and modified it slightly -- I added the
> pagetemplate line and a field for additional text.
>
> (:messages:)
> (:zapform:)
> (:zap pagetemplate=Systems.TestFormTemplate:)
> ||Create: ||(:input text makepage:)
> ||Add some text: ||(:input text txtWords:)
> || ||(:input submit:)
> (:zap if1="namefmt {makepage} ? create=Systems.{makepage}":)
> (:zap if2="! namefmt {makepage} ? warn=Invalid page format. ":)
>
> (:zap create="":)
> (:zapend:)
>
> (:if false:)
> [[#ID]]
> (:messages:)
> (:zapform:)
> Create: (:input text create:) (:input submit:)
> (:zapend:)
> [[#ID]]
> (:if:)
>
> I created the Systems.TestFormTemplate with the following:
>
> Page Name entered: {makepage}
> File Name: {create}
> Some words: {txtWords}
>
>
> When I run the form, I do get a new page, but it's always blank. I am
> misunderstanding templates on a zap and pmwiki level. Horribly confused.
>
> Thanks
> Scott Smith
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/pmwiki-users/attachments/20070622/7c02c3bb/attachment.html 


More information about the pmwiki-users mailing list