Forum OpenACS Q&A: Re: template variables and instances

Collapse
Posted by Stefan Sobernig on
Matthew,

First, a clarification. There are two succeeding concepts in XOWiki:

1. Page Templates (::xowiki::PageTemplate) + Page Instances (::xowiki::PageInstances)

2. Forms (::xowiki::Form) + Form Pages (::xowiki::FormPage)

The former (1.) have been succeed by the latter (2.) in more recent versions (starting with 0.60+). As I assume that you work with a version 0.60+, we are only talking about Forms and Form Pages. I just got the impression that you were somewhat caught in the version jungle.

How do I define variables that will autogenerate the forms for their input in a template?

Well, i'd suggest you take a look at the forms I exported (see prior posting) from Gustaf Neumann's sample repository, import them in your instance, and you will have a clear picture. In edit mode, a ::xowiki::Form offers you the opportunity to specify both a template for the view mode of form pages and the edit mode of these form pages. In either case, you can use the adp-inspired syntax @myvar@ to position placeholders in your template content.