Tribiq CMS

Choose your language

2.1 The Template Wrapper Files

The Template Wrapper files, in the /templatewrap/ folder, create a framework in which the CMS will handle can be included into your templates. They encapsulate the typical templates within a Template Family.

Tribiq CMS recognises that many of your web pages have functions and scripts that are common between them.

For example, the <head> section of each HTML page will have <title> and <meta> tags, and we figure you’d like to have these driven from the CMS on an Item by Item basis.

2.1.1 Template Head

The files used for this are templatehead.php or occasionally (in the case of error pages) fixedpagehead.php.

This is the very start of each Tribiq page. It contains:

  • the <doctype>
  • the <title> tag of each page
  • the <meta> tags
  • include for Template Family specific <head> content
  • the reference to site’s favicon
  • include admin functions if required
  • the location of the stylesheet
  • code to load Javascript/AJAX

Tribiq CMS will try to include following CSS files within your template family (if present):

  • styles/stylesheet.css
  • styles/sidemenustyle.css
  • styles/topmenustyle.css

The CMS will also include IE6 and IE7 specific stylesheets:

  • styles/style_ie7.css
  • styles/style_ie6.css

For IE6, we also search for the file csshover.htc, which allows :hover on elements other than <a>.

Tip: CSS Files
If you wish to use your own stylesheet names, for example “styles.css” or “new_color.css”, then you will have to edit templatewrap/templatehead.php to include these files. Tribiq Multisite users - remember that anything changed in the /templatewrap/ files will have an effect on all your websites - not just the one you may be seeking to edit.

The screenshot below might give you a better idea of what is contained within the template wrap.

2.1.2 Template Body Start

The files used for this are templatebodystart.php or occasionally fixedpagebodystart.php.

The <body> tag and the start of the HTML page body are held in this wrapper.

Tribiq CMS supports template-specific <body> Tags, meaning you can insert custom script in the <body> tag for each template.

For example, you can use <body onload=jsfunction();> in order to run a Javascript function when the page loads in the visitor’s browser. These options are controled by Template Details in the Admin Control Panel - there is no need to edit the <body> tag in these files.

We'll take a look at these settings later on.

2.1.3 The Templates Directory

This is what most of this Cookbook is about: it’s where the site-specific layouts and styles are held. We’ll look at this in detail in a moment.

2.1.4 Template Footer (templatefoot.php)

This wrapper contains the closing </body> and </html> tags. It also includes the admin javascript tooltip include.

The implication of the placing of the the <body> tags in the wrapper is that the templates themselves only contain the HTML which lies between these tags, and must not include <body> or </body>.

Top of Page