Page template

From VYRE

Jump to: navigation, search
Page template
module: Content module
supplier: VYRE Ltd.


Templates

Creating a Template Folder
Creating a New Template
Template Summary

Contents

Usage

The first component you need to add to start building your site is a template. A template is used to make it easy for you to quickly build pages onto your website. The principle of a vyre template is to assign portlets which features in all the pages you are building to save you time. this saves time on needing to build a portlet for each page for your site (for instance the navigation portlet) and if your requirements was to change, this could be easily deployed. Template level is where the majority of the html markup is kept on the site.

Configuration

You can setup a new template by going to the publishing module and in the template section. You will need to create a folder first before you can create a template. It is advisable to name these folders as sections of your website for quick reference to a particular template. Once you have created a template folder, you can now begin to create a template by clicking on the create template button.

Once on the template screen you can start building your template. On this screen you can choose what CSS style sheets and JavaScript files you want included into this template. In the contents you can write HTML markup to build up your template. For portlet areas we use our tag library.

Template Tag Library

this is our template markup tag library which needs to be included in every template you build.

<%@ taglib uri="http://www.vyre.com/taglibs/vyre-templates-1.0" prefix="vyre-template" %>

content-area

  • id : mandatory variable. this needs to be unique across all templates unless its marked as a shared portlet
  • shared: mandatory variable. either true or false. When it is marked shared, any portlets which are added into this particular template's content area, the portlet will feature on all the templates which feature this content area. For example we would set the main navigation content area to be shared. We would add this content area to the other templates we want this navigation to feature in. If we add the navigation portlet onto one template, the portlet will appear in all the other templates. You must activate the version in each template for this to reflect the changes.

example : <vyre-template:content-area id="sitesearch" shared="true" />

head

This will include all the CSS / JavaScript files that have been chosen on the template and the individual's page head. See adding a page

example : <vyre-template:head />

There are two attributes for configuring what output the template generates:

  • printGenerator - set to false if you want to skip outputting the <meta name="generator" content="VYRE Unify 4.5 (www.vyre.com)"/> tag entirely. This functionality was introduced in Unify 4.5. If you are using a previous version this feature will not be available.
  • printVersion - set to false if you want to omit the version from the content of the generator tag. This functionality was introduced in Unify 4.5. If you are using a previous version this feature will not be available.
  • printAlternativeLocales - prints a list of locales which may be possible for current page/item. See Creating and managing templates for more details. Since Unify 4.7.

footer-scripts

This functionality was introduced in Unify 4.7. If you are using a previous version this feature will not be available.

This will include the JavaScript script tags for the templates footer scripts.

example : <vyre-template:footer-scripts />

Template Features

Once you have made a template you can view the template.

you can start adding portlets to the shared content areas of the template. You will not be able to add portlets to the content areas which are marked as not shared. You can add caching settings to each portlet by clicking on the content area and clicking on the edit button. This will cache all the portlets featured in this content area. for more information see cache

Edit

Will take you to the summary page of the template. it will tell you what CSS / JavaScript files you have included in this template, the content areas used and the pages which are based on this template

Edit Source

Will allow you to change the HTML mark-up of the template. You can also add / remove vyre content areas from this template.

Activate this Version

This creates a new version of the template with all the recent changes to the template. Active versions of the page template will be used by pages in the backend. Whenever a page is deployed, the active version of template that it is using will be used in the frontend.

Deploy Pages

This will deploy all the pages that use this template.

Deploying all Pages

Template:Rellink

It is possible to deploy all Pages at once.

Old Versions

Unify automatically saves a copy of all old versions of a page template. To view a list of these versions click the Old Versions button on the context menu - (old versions will not be present if only one version of a template exists).

Image:templateOldVersions.jpg

A numbered list of old versions is displayed. Clicking on the version will fill the area at the bottom of the page with a preview of the old template version. Clicking activate this version will switch the page template being used on the site to this previous version. The currently active template version will display 'Active' in the status column.

Image:templateList.jpg

Comparing Page Template versions

It is now possible to view the differences between any two versions of a page template within Unify. To compare versions select Edit > List all versions, then use the radio buttons to choose the versions that you wish to compare then click compare.

A note about template versioning

The versioning of page templates is completely different to the way pages/XSL/Code templates are versioned. This is due to functionality page templates provide compared to the functionality of the other entities mentioned.

Templates are never deployed directly to the frontend. Instead they are created and "activated" ready for use on a page. It is then the Page which is deployed to the frontend (using whatever version of the template is active at the point of page deployment). It is never possible to "deploy" a template directly to the frontend.

See Also

publishing module cache

[category:publishing module]

Personal tools