Page Templates:First Look

From Whirlwind eCommerce Wiki
Revision as of 13:35, 21 October 2008 by Root (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Page Template Managers

Template management will include a list of all current templates in the system as selectable links in the left column for editing. Component (include) templates will be listed below the main templates. An add template link is provided at the bottom of this list.

The template management form is broken down as follows:

Template toolbar
this tool bar is located at the top and bottom of the form. When creating a new template, the ‘add new template’ button and preview field/button are provided. When editing an existing template the “post changes”, “delete” and “duplicate” buttons along with the preview field/button are provided. The buttons work as follows:
  • Add New Template: posts the form contents to the system as a new template.
  • Post Changes: post the form contents as changes to the existing template
  • Delete: deleted the template. Make sure no pages are currently using this template as they will be rendered useless after deletion of the template.
  • Duplicate: creates a new template that is a perfect duplicate of the current template. Time saving when creating templates that are very similar.
  • Preview: provides the means to view your template changes before they are posted live to the web site. Enter any pageId number into the preview field preceding the preview button and click the preview button to see the entered pageId’s content displayed within the current template.
Template Name
used for internal purposes (becomes the name of the template in the left column)
Component available to other templates
designates this template as an ‘include’ that may be selected to be included in other templates. Includes are recommended for any content that will be repeated in multiple templates so that this content can be changed in one single location effecting all including templates. The traditional C-nav (header, footer, left menu tabs) typically qualify as includes.
Menu
allows designation of a specific menu (managed in menu management, menus dictate the contents of the navigation tabs) for pages using this menu. Default will use the ‘default’ menu as selected in menu management.
Description
for internal purposes, description of when this template should be uses, anything unique or noteworthy about it.
Pre Process
Code that should be executed before the bulk of page processing occurs. As a significant amount of overhead is required to gather the appropriate data that will govern and be available for the ‘code’ area of the template, sometimes it is more efficient to run some qualifying functions before this activity occurs. Examples are using the qualifying functions to decide if a visitor should even be allows to access a page, validate incoming custom attributes, etc. The contents of the pre-process field will be evaluated as PHP.
Code
the code sets how the page will output. The contents of the code area will be evaluated as PHP meaning all your output should be entered using “echo” statements and encased in quotes. Always begin the contents of the “Code” area by calling on the functions required to provide the information you need in the code. See “Content Access Functions” below for more details.
Override TinyMCE WYSIWYG editor settings
use to custom set the options and behavior in the WYSIWYG editor in page management for pages using this template. Visit tinymce.moxiecode.com for configuration options.
Use summary, link, copy, printable template
turn on / off the availability of these fields in page management
Style sheets: allows entry of specific style sheets to be used by the wysiwyg editor. If empty, the pages using this template will inherit the style sheets entered in the ‘settings’ area of administration. Note that since the wysiwyg editor is a stand alone entity, it will not be subject to ‘parent’ css object settings that may be in the outputted page – be sure to manage your css accordingly.
Page Custom Field Settings
allows creation and management of custom fields that will be available to pages using this template. See below for details on how to use custom fields. Note that when referencing custom fields in code, use the ‘custom_field_’ prefix (for example, to output the custom field names “myField” use “echo $custom_field_myField;”)
Photo album settings, copy config, legacy data access are depreciated.