Site-wide template

From Online Business Wiki

Jump to: navigation, search

Click on + to expand the category

Contents

Introduction

In this application we refer to all templates as site-wite templates. There are many types of templates you can use in the system, such as:

  • Site template - The Default template that represents the general look and feel of your site. This template is usually applied to your web pages and other content.
  • Print templates - The Printer View template is used when generating the output for a printable page. It can contain functionality modules, but should be graphically simple and hence easy to print out.
  • Email templates - The Email template is the template you apply to your outbound system emails. It should be simple and light on the HTML. No functionality modules can be used in an email template.
  • Web App templates - The Web Apps template wraps around your web app items.

We most commonly refer to "Website templates" when we talk about templates.

You can create all the various template types in Triangle. You can set a template to be default or printer view by selecting the appropriate checkbox. Email templates are templates you use with your email newsletter campaigns there is no mechanism to designate a template as an email template.


A template is a web page fragment that allows you to re-use content elements across your web pages. Templates save a significant amounts of time, allowing you to avoid repetitive copying of common elements like page headers and banners, footers and navigation menus on every page. A template is designed to wrap around page content, thereby making each page take on a consistent appearance.

Image:image036.gif

Why use a Template?

Apart from saving time, Templates are used for two key reasons

  • To maintain consistent branding across all pages
  • To manage your sites overall look and feel in one, central place making a change to the template affects all pages that use that template.

Image:image037.gif

Creating a Template - Admin

Creating a template is easy – you can create a basic template in a few simple steps. As with many items in the system, creating a template consists of:

  • Enter the details of the template
  • Create the template’s content

Firstly to add the details of the template, we do the following.

  • 1. Click Admin -> Manage Site-Wide Templates -> Create A New Template

to add a new template

Image:newtemplate.png

  • 2. Enter in a descriptive Template Name for your template. If this template is the site’s main template for your web pages, check Default Template. If this template is to be used as the printer template for wrapping content before printing (via the Printer View module, discussed later), check Printer View.


Image:templatedetails.png

  • 3. Clicking Show More Options allows you to:
    • a. Upload a template file you have prepared previously
    • b. Download the template file you have in the system already
    • c. Enter a Template Description
    • d. Assign a Workflow Approval to this template. By assigning a

workflow approval to this template you ensure that you or the people you designate are notified to approve the changes before they go live.


Image:templateupload.png

  • 4. Click Save to create a working copy, or click Save & Publish to make your

new template usable and viewable to the public.


Image:savetemplate.png


Secondly, we enter the content of our template. Notice the {tag_pagecontent} tag. This is where your page content will be inserted into the template.

Image:templatelook.png

Now we are ready to create the basic layout for the template including the insertion of images and modules.

Click the Preview in new browser button to get an idea how your new template looks.

Image:templatepreview.png

Creating a Template (Triangle)

You need to login via Triangle and create a new template, giving it a name and description.


Image:image064.jpg


Link in the CSS style sheet within our HTML code.


Image:image065.jpg


You can now begin to build the header and footer elements, inserting images and so forth. You should upload your images via FTP.

You should leave notes indicating where the modules such as Dynamic menus should go. Use "preview" regularly to make sure things appear as they should.


Image:image066.jpg


Uploading your own template

If you have created your template externally and you want to upload it you can quite easily do that trough the Admin interface. All you have to do is go to Admin -> Manage Site-wide template -> Create a new template -> give your template a name and save it. Then you need to click on Template details -> Show more options" -> click the upload button and select your template.

Please note that you will still have to include {tag_pagecontent} into your template as that tag renders the content of your web pages.


Image:Templates - upload own template.jpg

Editing a Template

To edit a template simply go to Admin -> Manage Site-wide templates -> and click the name of the template you want to edit. The template will then open in the online editor where you can edit it.

Deleting a Template

To delete a template simply go to Admin -> Manage Site-wide templates -> click the name of the template you want to delete and click delete button.

{tag_pagetitle} for combining the template title with the page title

This box allows users to specify the title of their web page much more easily than having to set it in the actual web page via the <title> element.

Image:Templates - page title tag.jpg

So going forward this is the rendering process in respect to the page title:

  1. If the user specifies page title using the page title box in Show More Options this takes precedence
  2. If no page title is specified in (1) but a page title is found in the page HTML (traditional page title set through Page Properties) this now takes precedence
  3. Finally, if no page title is found then we will use the page name

In some cases, there are instances where you may want to keep the template title and to merge the template title with that of the web page.

To do so simply specify {tag_pagetitle} in the template title e.g. <title>{ tag_pagetitle} - Company Name</title>

So if we see this tag we then merge, otherwise we ignore the template title altogether.

This effectively allows you to achieve titles like: "Page Title - Company Name" where company name is only entered once in the template.

Related articles


Personal tools
Support Material