Header and Footers

The header file (header.php), and footer file (footer.php) belong in the templates/default/ folder (where default is the template name).

These are included at the start and end of every page on your website, and are written in HTML and PHP. These files should include all standard elements of your design, for example a header, navigation bar and website footer. (Although in some cases you may wish to keep some of these elements in your page layout templates if this is better for your design.

There are a few pieces of code that should always be included in these files to make your template work.

Inside the head tags

To print the title:

<title><?php print($title); ?></title>

To set the base of relative URL's:

<base href="<?php print($weburl); ?>">

To output head content, pasted into pages:

<?php
	print($headContent);
?>

After the opening body tag

To include the Unicity CMS admin bar:

<?php
    include("adminmenu.php");
?>

Before the closing body tag

To output footer content, pasted into pages:

<?php
     print($footerContent);
?>