Recent Changes - Search:

CONGO

PmWiki

edit SideBar

TemplateOverview

Main.TemplateOverview History

Hide minor edits - Show changes to output

Changed line 22 from:
   <input type="hidden" name="cancel" value="cancelpage">
to:
   <input type="hidden" name="cancelpage" value="cancelpage">
Added line 22:
   <input type="hidden" name="cancel" value="cancelpage">
Added lines 28-29:
Cancel buttons are special - the 'cancel' variable is checked on submission, if it is hit, then the template specified in the 'cancel' value will be displayed.  No further processing is done.
Changed line 12 from:
 <input type="hidden" name="page" value="templatename">
to:
  <input type="hidden" name="page" value="templatename">
Added lines 8-14:
!!!Displaying a template from a link or form
 <a href="mainpage.php?page=templatename">
or
 <form method="post" action="mainpage.php">
 <input type="hidden" name="page" value="templatename">
 </form>

Added lines 1-24:
!!Templates

A template lets a convention administration build and configure screens to be shown to attendees.  Traditionally, templates are used for building online registration screens, but they can be used for anything.

!!!Steps to create templates
* First create the teplate in the 'Work with Templates' section of Coconut

!!!Linking forms with hidden fields
Any post form in the template can define what is to happen when the form from the template is submitted.  A typical arrangement woudl be:
 <form method="post" action="process.php" onSubmit="return emailCheck(this.email.value)">
  <div>
  <input type="hidden" name="process" value="createlogin">
  <input type="hidden" name="success" value="okcreate">
  <input type="hidden" name="failure" value="failedcreate">
  </div>
 </form>

In this case, when a submit button is hit on this form, it will run the 'createlogin' function in the processing script.  If the process succeeds, the template 'okcreate' will be displayed.  If it fails, then the 'failedcreate' template will be shown.

!!!Notes about templates
Templates should have minimal formatting in them.  Formatting should be done via the stylesheet, as defined in the Convention Details screen in Coconut.

The stylesheet can be included in any template by including this line in the <head> block:
  <link rel="stylesheet" href="stylesheet-handler.php" type="text/css">
Edit - History - Print - Recent Changes - Search
Page last modified on January 24, 2008, at 11:58 AM