History: Theme Options aka Child Themes
Source of version: 4 (current)
Copy to clipboard
Theme options are an easy way to have variations of a theme that is already installed at a Tiki site. Typically they change the "base" theme's coloring, font style, column widths or other such details. When a theme has one or more options, there will be a second dropdown list wherever theme selections are made or assigned in Tiki, such as the user preferences page, the Look and Feel admin page, and the theme-switching module. The option can also be activated via a URL, like ''tiki-switch_theme.php?theme=fivealive.css&option=kiwi.css''. !! How to make a theme option To make a theme option, create a new CSS file, add CSS rules that you want the theme option to have (that is, the selectors/properties of the base theme that you want the theme option to override), and save it in a location with a path like this: "themes/parent-theme-name/options/option-theme-name/css/option-name.css. For example, FiveAlive's "Kiwi" theme option style sheet file is located at ''themes/fivealive/options/kiwi/css/kiwi.css'' If a theme already has an options directory, use that one; if not, make a new one. !! Theme option background images If the theme option has alternate background images, these can go in a new directory with the same name as the theme option, such as ''themes/fivealive/options/kiwi/images/'' There's no need to modify the base CSS file, or to put anything such as an import statement in the option file, for the theme option to work. The option file is simply loaded after the base file, so it overrides properties of the base file. !! Advantages Beyond being a quick way to modify an existing theme, theme options are a good way to have a modified version of the standard Tiki themes at a site. This way, a site can have its own modification of a theme, and when the base theme is updated and installed during a site upgrade, the theme option isn't overwritten and will still function as expected, maybe just needing to be edited if any of what it's overriding changed. ~tc~ (alias(Theme Options)) ~/tc~