Recent Changes - Search:



edit SideBar



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

Displaying a template from a link or form

 <a href="mainpage.php?page=templatename">


 <form method="post" action="mainpage.php">
  <input type="hidden" name="page" value="templatename">

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(">
   <input type="hidden" name="process" value="createlogin">
   <input type="hidden" name="success" value="okcreate">
   <input type="hidden" name="failure" value="failedcreate">
   <input type="hidden" name="cancelpage" value="cancelpage">

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.

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.

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