Skip to main content
ZenHub houses documentation to support you if you’re using Contensis Classic. Contensis Classic includes our WYSIWYG and templating features. If you’re working with a newer version of Contensis, is your go-to place to find anything Contensis-related when building with content types.

Modify content outside a template body

It is often necessary to include custom data, scripts, metadata or CSS references within the head of the template. There are various methods available to achieve this.

Using a default ASPX template

How you embed content in the head of the template is really down to what you are embedding, we have specific methods that can be used for script, JavaScript files, style sheets etc.

  1. Assigning JavaScript to a template
  2. Assigning stylesheets to a template

Using a custom render template

A render template is a specialised template type that gives you huge control over the content outside of the body tag and is used extensively on ZenHub. Render templates are in text format (TXT) and can be attached to your current templates to include additional information provided in the render template.

A render template includes a set of tags so that Contensis knows where to put your templates different sections, the header, stylesheets, metadata and more. This also allows you to insert more information into the template, such as Internet Explorer specific stylesheets.

The following comments in the render template are replaced when a page is published. We have provided our default render template as an example below this table.

Render Template Comments
Comment Replaced with
<!--PageDirs--> Custom page directives defined in the customPageDirectives project setting
<!--RegisterTagsPrefixes--> If the page contains a forum control, this will register the namespace prefix for the control
<!--CONTENSIS_DEFAULT_PROPERTIES--> A VB script block defining the standard Contensis variables for the page as public properties, e.g. page author, path etc. plus any metadata and taxonomy fields
<!--server--> The publishing server name - corresponds to SS_ServerSettings.SS_Name (in the CMS database) for the publishing server
<!--ss_id--> The publishing server ID - corresponds to SS_ServerSettings.SS_ID (in the CMS database) for the publishing server
<!--SS_TYPE--> The publishing server type (1 = Test, 2 = Normal) - corresponds to SS_ServerSettings.SS_Type (in the CMS database) for the publishing server
<!--CustomCode--> VB script code for the Custom Code events defined for the page template
<!--PageTitle--> The page title as an <asp:Literal> element
<!--MetaData--> Metadata defined for the page as <meta> elements
<!--StyleSheets--> Stylesheets defined for the page as a StyleSheetCollection control
<!--Content--> The actual content of the page as HTML markup

Default Contensis render template

How to assign a render template to a template

  1. Click through to the Properties tab when editing the template you want to use a render template.
  2. In the Template Type section, change the Render Page value to Other.
  3. You should then see a new field, called Render Template.  Simply type in the path to your render template.
  4. Save your template. This will now use the modified render template when rendering your pages.