Skip to content
This repository has been archived by the owner on May 28, 2019. It is now read-only.

Creating a Theme

Johan Strydom edited this page Feb 15, 2014 · 5 revisions

For the Theme, simply create a new folder under /themes. The new folder's name should be the theme name. Within the folder a file called default.css is created. Within default.css all the css styling for the theme can be made. E.g.

/themes/mytheme /themes/mytheme/default.css

Activate the theme

To activate the theme, replace $_TSAMA_CONFIG['THEME'] = 'default' with the name of your theme in the /conf/site.conf.php file

E.g.

$_TSAMA_CONFIG['THEME'] = 'mytheme';

Configure the theme

It is possible to specify nodes that should be loaded at the beginning or end of the head and body. This can be specified for a specific theme.

In order to configure the theme a .nfo.xml file need to be created within the theme folder. E.g.

/themes/mytheme/mytheme.nfo.xml

Example content follows:

<?xml version="1.0" encoding="UTF-8"?>

<theme name="mytheme">

<head position="first">

<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<link href="css/bootstrap.min.css" rel="stylesheet" type="text/css" />

<link href="css/bootstrap-theme.min.css" rel="stylesheet" type="text/css" />

</head>

<body position="last">

<script src="js/jquery-1.10.2.min.js" type="text/javascript" />

<script src="js/bootstrap.min.js" type="text/javascript" />

</body>

</theme>

Theme override

It is possible to override the default configured theme by specifying another theme in the Service configuration file. This can only be done with primary services. See Configuring a Service

E.g.

<service name="basic" primary="true" theme="anothertheme" >

Table of contents

Introduction

Installation and Configuration

Predefined Constants and Globals

Creating a Layout

Creating a Theme

Creating a Service

Configuring a Service