Loading...
 
Skip to main content

History: Content Templates

Source of version: 23 (current)

Copy to clipboard
            ! Content Templates
Content templates provide a way to  ensure new content is created using a standardised style/layout which is particularly important when a Tiki system has multiple editors. They can also allow complex new content to be created to an initial stage both quickly and consistently.

Each template is just a block of static HTML markup or wiki syntax and other text, images etc., that can be created using either the standard wiki editor or the WYSIWYG editor, and can then be applied as starting content when creating tiki objects. The following objects currently use content templates:
* Wiki pages (HTML format or wiki format)
* Articles or submissions
* Newsletters


!! Activate the feature
* __Wiki pages__: 
** You can enable them in __Control Panels > Wiki > General Preferences (tab) >Editing (section) > Wiki content templates __
** You may want to enable there also the other option: ''Lock Content Templates''
* __Articles or submissions__: 
** You can enable them in __Control Panels > Articles > General Settings (tab) >Features (section) > Article content templates __
** You may want to enable there also the other option: ''Lock Content Templates''
* __Newsletters__: 
** You can enable the Wiki content template to create a template for newsletters, through a wiki page, or through a standalone text area.
** Once you have newsletters enabled, and one newsletter defined, when you go to compose a newsletter for sending, you will be able to select content templates.
  
!! Use it
To create or edit a content template, follow the "__Content templates__" link from the admin section of the application menu (called the Settings menu from Tiki14 onwards). It will take you to tiki-admin_content_templates.php

When a new template is created not only is the content defined but whether the template can be used in Articles, Wiki pages or Newsletter is configured by a series of checkboxes.

The content itself is either created in the edit section of the screen (using either the standard wiki editor or the WYSIWYG editor)  - this is the 'Text area' option in the 'Template Type' field -  or it can be 'referenced' by providing the name of an existing wiki page - this is the 'Wiki Page' option in the 'Template Type' field . 

The details of the individual screens are shown below:

{TABS(name="CT_screenshots" tabs="Tiki14|Tiki15")}
{img fileId="1258" imalign="center"}

In Tiki14, and earlier versions, there is a single admin screen as shown above where a new template can be defined in the top section and the bottom section tabulates the existing templates allowing them to be 'selected' for re-editing if required.

/////
{img fileId="1259" imalign="left"}  {img fileId="1260" }

From Tiki15 onwards the Content template admin screen is separated into two individual 'Templates' and 'Create template' tabs, each of which is illustrated above.

Categorisation is now also allowed from Tiki15 onwards so that access to individual templates can be restricted to designated Groups by the usual categorisation process. In the 'Create template' tab there is now a Categorize section to allow individual categories to be selected in the usual checkbox manner and in the  'Templates' tab an additional column now shows which categories the existing templates have been assigned to, if any.

In addition from Tiki15 onwards, a Content template can now be locked with a clickable icon shown, when appropriate, in both the 'Templates' listing table and the edit screen for each template.

{TABS}


^Important: If editing an HTML page template, created with the WYSIWYG editor, the wiki syntax may be OFF and features such as wiki references and others may not be parsed unless the WYSIWYG editor is appropriately configured . ^

Once a template is created, editors will be able to apply it when editing an object of the type that the template has been specified for. 

If a content template is applied to an existing object that already has content, the content template will be pasted in at the beginning of the page but won't overwrite the existing content.

The content template that is applied to any particular page is a copy of the original. Once applied, the content template becomes part of the page, article, etc., and can be edited as freely as the rest of the object. If the content template original changes, the Tiki objects that used the earlier version of the template are not changed.

The template has to be chosen each time a new page is created, there is no way to pick a different default entry other than "none" (but there is an open[http://dev.tiki.org/tiki-view_tracker_item.php?itemId=2579|request for an enhancement]).

!! Further details
Further details of how templates are used are provided in the User Guide at ((Using Content templates)).



-=alias=-
* (alias(Content Template))