Template Gallery

The CMS is capable of installing existing templates, these templates can be built by packaging up a ZIP file with the required content and including basic HTML configuration.

Installer Configuration

The ZIP file must contain a file called installer.xml this file contains the steps necessary to recreate the template in the CMS. Any file references in the XML should also be contained in the ZIP file, sub folders in the ZIP are not supported.

Example

<template type="MasterPageTemplate">
  <Information>
    <Name>TerraFirma Master Page Template</Name>
    <Author>www.nodethirtythree.com</Author>
    <Preview content="preview.png" />
  </Information>
  <Wizard>
    <Step index="0">
      <Intro>
        Please configure your template
      </Intro>
      <Ask var="name" default="Site">Template Name:</Ask>
      <Ask var="websiteTitle" default="Website">Website Title:</Ask>
      <Ask var="websiteTagline" default="by NodeThirtyThree">Website Tag Line:</Ask>
    </Step>
  </Wizard>
  <Workflow>
    <MasterPageTemplate name="{name}" content="masterpagetemplate.xml"/>
    <Assets>
      <Images>
        <Asset content="a8.gif"/>
        <Asset content="a10.jpg"/>
        <Asset content="a50.gif"/>
        <Asset content="a16.gif"/>
      </Images>
      <Css>
        <Asset content="terrafirma.css"/>
      </Css>
    </Assets>
    <Views>
      <View contains="Pages" name="Top Level Menu"/>
    </Views>
  </Workflow>
  
</template>


The schema is described as follows:

Schema Element Attribute Possible Values Description Required
template type <text> The category within the template gallery, e.g MasterPageTemplate Yes
template/Information/Name <text> The name of the template Yes
template/Information/Author <text> The author of the template No
template/Information/Preview content <filename> The image to display when the the template is previewed No
template/Wizard/Step Contains each prompt for user input No
template/Wizard/Step index <number> Sequential step number Yes
template/Wizard/Step/Intro <text> Text to display on the wizard step during installation Yes
template/Wizard/Step/Ask/ var <text> Variable name to store the input from thse user Yes
template/Wizard/Step/Ask/ default <text> Default value of the variable Yes
template/Wizard/Step/Ask <text> Prompt text Yes
template/Workflow Contains each workfow step Yes


The following workflow steps can be added to the template to perform each installation action

Last edited Jun 14, 2011 at 10:42 PM by methodworx, version 6

Comments

No comments yet.