Templates in Unicity CMS are designed to allow you to code whatever website you like. There are some fundamentals you'll need to stick to, but its then up to you how you want to make your website in Unicity.
A website will normally have one master template, which is called "default", however it may also have other templates which can be attached to different sections of a website if required.
These are PHP files that are included at the start and end of a page. Depending on your design and code structure you may wish to include lots of your design in the header and footer, otherwise you may want to keep these minimal and instead include your code in the Page Layout templates.
Unicity CMS requires two CSS files, layout.css and designstyle.css as part of your template, which should be placed in the /css subfolder of the template. You can however have as many other CSS files as you wish.
designstyle.css is used to style the content in WYSIWYG editors within Unicity CMS, so all styles relating to typography and user selectable styles should be included in this file.
layout.css would normally include any structural styles.
It is strongly suggested that all images related to your template are stored in the /images sub folder of your template to avoid them being interfered with by users.
User editable images should be stored in the root /images folder, as this is accessible to users within the CMS interface.
Some Unicity Apps and Modules can also have their layouts customised through PHP files included in your template folder. For more details see the documentation for that module.
Unicity CMS uses .tmpl files to define HTML layouts. Each website will need at least one page layout template, but you'll often have more than one to allow for different page types, with different editable regions.
Additionally, TMPL files may include other TMPL files, where common elements may be shared between multiple templates.
To allow a user to select a template, it should be named templateX, where X is a number, for example template1.tmpl
Included templates can have any name you wish, for example partial.tmpl.
Each page layout template that you wish to be selected by a user needs to have its own corresponding field definition file. This is a PHP file containing arrays that define the editable regions of the templates.
These files should be named templateX.php, where X is the corresponding number of the TMPL file, e.g. template1.php.
Page layout templates and template field definitions should be placed directly in the /templates folder of your website.