Tiki uses the Smarty template engine, so pages generally have a PHP file (.php) and a Smarty template (.tpl) associated with them. These produce the XHTML for the page, which is then given visual styles with CSS. The CSS is provided by a combination of some feature-specific stylesheets, default layout and design stylesheets, and theme stylesheets.
There are several features that determine which theme is displayed for a given screen.
If preference change_theme is enabled than users are allowed to change theme. It is possible to limit the themes users can pick from.
If Theme Control feature is enabled:
- If a theme is assigned to the individual object that theme is used
- If not then if a theme is assigned to the object's category that theme is used
- If not then a theme for the section is used
- If none of the above was selected the user theme is used
- Finally if the user didn't select a theme the default theme is used
The different theme settings are stored in preferences and can be accessed smarty variable
Main prefs: $prefs['theme_active'] - this is the theme that will be displayed. This pref is not stored in the database, it is set dinamically depending on enabled features (eg: change_theme) $prefs['theme_site'] - the theme setting for the site stored in tiki_preferences table $prefs['theme_option_site'] - the theme option setting for the site stored in tiki_preferences table $prefs['available_themes'] - list of themes available for users to pick their preferred theme for the site stored in tiki_preferences table $prefs['user_theme'] - the user's theme preference stored in tiki_user_preferences table $prefs['user_theme-option'] - the user's theme preference stored in tiki_user_preferences table $prefs['tc_theme'] - the user's theme preference