Site template

Site template – a page layout (s) to the user of the site, the site design.

The main site is the name of the template – site.php. Standard design DIAFAN.CMS is the template the themes/site.php, but if your site uses themes, the same file (s) may be in the custom/theme-name/themes/site.php. By default, all pages of the site using a template file with this name if any page does not assign forced template with a different name (see below). A template is a file with the usual HTML-code with inserts template tags.

The template can be added to the PHP-code by highlighting its standards obscene <?php *** ?>.

With the introduction of their own design faster and easier to just take the source file included in the package DIAFAN.CMS default themes/site.php and replace the HTML-code, which is between the tags: <body></body> on your own code. Then will just place the template tags.

Several site templates

DIAFAN.CMS supports several site templates. This means that the different pages of the site can have a different template.

To any page of the site to establish a different design, distinct from themes/site.php, you must:

  1. In the folder themes download the template(s) with the extension .php (eg, site_shop.php or onlynews.php). The template name can not contain any characters other than latin letters, dots, dashes and underscores.
  2. The administrative part of the site (module "Site pages") to open a page for which a different design must connect and reveal "Additional properties" tab. DIAFAN.CMS scan folder themes, will find there all your downloaded files, and drop-down list properties "Design of page" will only select the downloaded template file.

"The design of the page" inherited pages lower default level.

Serveral site themes

DIAFAN.CMS supports several site themes. This means that you can change the appearance of all the user of the site in one click.

For this purpose the module "Design and themes".