History: Template Overview
Preview of version: 2
(from Style and Themes - to be updated)
How to modify TPL files
The TPL files are written using the Smarty template language, which takes a little getting used to. See smarty.php.net.
To modify the layout of Tiki in your theme, just edit the files you copied. You can add images, define columns, etc.
The specific template files will differ based on which pre-existing theme you choose, but some of the commonly used files are:
- tiki.tpl: the main template defining the layout of the whole application
- error.tpl: used to display errors
- header.tpl: the HTML header
- tiki-top_bar.tpl: top navigation bar
- tiki-bot_bar.tpl: bottom navigation bar
- the template files with names like tiki-print.tpl are used for printable representation of objects so you usually don't want to change them.
As you can see you can modify the layout of the whole tiki application by just changing one file.
Overriding templates
As we saw above, the template files for custom themes all live in a directory named something like templates/styles/custom_theme_name--for example, templates/styles/screensite. The default template files live just one directory below there, in templates and its subdirectories, notably:
- templates/mail
- templates/modules
When creating a theme you can override any template file. You just need to put a modified template file in the directory templates/styles/custom_theme_name.
For example, if we wanted to modify the forum listing in our screensite theme, we'd just copy the file tiki-forums.tpl from
- templates/tiki-forums.tpl
- to
- templates/styles/screensite/tiki-forums.tpl
Then we'd edit our new copy of the file.
Tiki will substitute whatever is in your custom theme directory for the TPL files in the default directories.
- templates/modules/mod-application_menu.tpl
- to
- templates/styles/custom_theme_name/modules/mod-application_menu.tpl
History
Information | Version | ||||||
---|---|---|---|---|---|---|---|
06:26 UTC System Administrator automatic conversion | 18 | ||||||
Mon 15 of Feb, 2016 12:51 UTC Jean-Marc Libs | 17 | ||||||
Mon 15 of Feb, 2016 12:47 UTC Jean-Marc Libs | 16 | ||||||
Wed 19 of Mar, 2014 01:27 UTC Marc Laporte | 15 | ||||||
Sat 27 of Jul, 2013 07:08 UTC haggis73 changed url and comment to smarty. | 14 | ||||||
Wed 30 of Jun, 2010 07:33 UTC Gary Cunningham-Lee Some updating. | 13 | ||||||
Wed 30 of Jun, 2010 06:45 UTC Gary Cunningham-Lee Changed bold line to heading. | 12 | ||||||
Wed 30 of Jun, 2010 06:44 UTC Gary Cunningham-Lee typo | 11 | ||||||
Wed 30 of Jun, 2010 06:43 UTC Gary Cunningham-Lee Some updating. | 10 | ||||||
Tue 27 of Jan, 2009 12:37 UTC Gary Cunningham-Lee Updating | 9 | ||||||
Tue 27 of Jan, 2009 12:34 UTC Gary Cunningham-Lee Some updating. | 8 | ||||||
Wed 08 of Oct, 2008 05:18 UTC Gary Cunningham-Lee Some updating. | 7 | ||||||
Mon 09 of Jun, 2008 15:12 UTC Oswaldo1965 | 6 | ||||||
Mon 21 of Apr, 2008 20:24 UTC mlpvolt | 5 | ||||||
Fri 28 of Dec, 2007 20:30 UTC mlpvolt | 4 | ||||||
Mon 20 of Feb, 2006 02:32 UTC Gary Cunningham-Lee Minor edits. | 3 | ||||||
Fri 17 of Feb, 2006 06:56 UTC System Administrator Content added from doc.tw.o | 2 | ||||||
Fri 17 of Feb, 2006 02:41 UTC system created from structure | 1 |