Loading...
Find
Log in
Username:
Password:
CapsLock is on.
Remember me (for 1 week)
Log in
Stay in SSL mode
History: Template Overview
View page
Show All Versions
Source of version: 16
«
»
''(from [http://doc.tikiwiki.org/tiki-index.php?page=Styles+and+Themes|Style and Themes] - to be updated)'' !! How to modify .tpl files __About Smarty__ The .tpl (template) files are written using the Smarty template language, which has its own syntax, etc. Smarty is mainly used for defining environment variables and the logic that follows (like who to show what when how). See [http://www.smarty.net/|smarty.net]. Modifying the .tpl files isn't recommended if the site's appearance can be changed using CSS alone; sometimes it is necessary, though, but be sure to be familiar with Smarty syntax and how Tiki uses Smarty files before going this route. !! The Template Tree Tiki's templates are called in a specific order within the code, so it's good to know what is a parent of what, particularly for the main few used for the basic layout of the site. !!! Templates (most frequently modified) * ''tiki.tpl'': the main template defining the layout, which calls: ** ''header.tpl'': the HTML head section (avoid modifying, if possible) ** ''tiki-site_header.tpl'': site Look & Feel options and/or menu ** ''tiki-top_bar.tpl'': possibly menu and search form ** ''tiki-bot_bar.tpl'': bottom banner links/credits bar (Whether ''tiki-site_header.tpl'' or ''tiki-top_bar.tpl'' or both needs to be modified depends on what theme files are used as a starting point for a custom theme. ((Themes_for_TW2|New themes)) tend to use ''tiki-site_header.tpl'' for more Look & Feel components, and reserve ''tiki-top_bar.tpl'' for the menu (usually a CSS, or suckerfish, menu) and sometimes the search form.) !!!! The new power of L&F custom code In Tiki 4 and Tiki 5, a number of custom code text areas have been added on the Look and Feel admin page that may make it unnecessary to modify the relevant .tpl file, depending on what the desired customization is. This course should be considered first as it's easier to update the site to new Tiki versions when there are fewer file customizations. !!! Smarty template start/end tags To put Smarty template beginning and end tags in comments in the final page source, as of Tiki 4 there is an option in Admin Features(tiki-admin.php?page=features), under the Developer tab, called "Smarty Template usage indicator". As indicated on that page, "Use only for development, not in production because these warnings are added to emails as well, and visible to the users." You can then check the final page source to see what code is produced by what Smarty template file. You need to clear the template cache (tiki-admin_system.php?do=templates_c) for this change to be taken into effect. !!! Theme-Specific Templates To modify the layout of Tiki in your theme, edit theme-specific copies of default Tiki template files. While CSS editing is used to specify the details of page appearance, it may be necessary to edit template files to make major rearrangements of items on the page. But an increasing amount of flexibility is being added to Tiki via admin configuration, which tends to make template editing unnecessary. !!! Overriding templates Since Tiki13 and afterwards, Tiki themes are self-contained. For older versions, see link below. The theme directories are stored in the ''themes'' directory, with the same name as the theme. For example, ''themes/custom_theme_name''. A theme's files will override any default template file. You just need to put a modified template file in the directory ''themes/custom_theme_name/templates/''. For example, if we want to modify the forum listing in our ''screensite'' theme, we'd just place a copy of the file ''templates/tiki-forums.tpl'' in ''themes/screensite/templates/'' and then edit the new theme-specific copy of the ''tiki-forums.tpl'' file. Tiki will substitute whatever is in your custom theme directory for the .tpl files in the default directory. This technique works on files in the subdirectories, too. That is, to change the application menu in your theme, just copy the file ''mod-application_menu.tpl'' from ''templates/modules/'' to ''themes/custom_theme_name/templates/modules/''. This technique works for theme options as well. That is, if you want to modify the forum listing only for the option ''my_custom_option'' of theme ''custom_theme_name'', just copy the file ''templates/tiki-forums.tpl'' in ''themes/custom_theme_name/options/templates/''. Theme options custom templates take precedence over theme custom templates and over default templates. {REMARKSBOX(type="warning",title="Warning",icon="y")}You need to clear the template cache (tiki-admin_system.php?do=templates_c) for this change to be taken into effect.{REMARKSBOX} It's recommended that as few template files be customized as possible, and the customizations kept as minimal as possible, in order to keep the maintenance and updating of the files easier. The more extensive the customization, the harder to keep in sync with the functionality of Tiki as it advances. Note: In Tiki12 and before, the custom template files were stored in ''templates/styles''. Please refer to the [https://themes.tiki.org/tiki-pagehistory.php?page=Template+Overview&preview=15|old version of this same page].
History
Enable pagination
rows per page
HTML diff
Side-by-side diff
Side-by-side diff by characters
Inline diff
Inline diff by characters
Full side-by-side diff
Full side-by-side diff by characters
Full inline diff
Full inline diff by characters
Unified diff
Side-by-side view
HTML diff
Side-by-side diff
Advanced
Information
Version
Mon 15 of Feb, 2016 12:51 GMT
Jyhem
16 - 17
Wed 19 of Mar, 2014 01:27 GMT
marclaporte
15
Sat 27 of Jul, 2013 07:08 GMT
haggis73
changed url and comment to smarty.
14
Wed 30 of Jun, 2010 07:33 GMT
chibaguy
Some updating.
13
Wed 30 of Jun, 2010 06:45 GMT
chibaguy
Changed bold line to heading.
10 - 12
Tue 27 of Jan, 2009 12:37 GMT
chibaguy
Updating
8 - 9
Wed 08 of Oct, 2008 05:18 GMT
chibaguy
Some updating.
7
Mon 09 of Jun, 2008 15:12 GMT
Oswaldo1965
6
Mon 21 of Apr, 2008 20:24 GMT
mlpvolt
5
Fri 28 of Dec, 2007 20:30 GMT
mlpvolt
4
Mon 20 of Feb, 2006 02:32 GMT
chibaguy
Minor edits.
3
Fri 17 of Feb, 2006 06:56 GMT
admin
Content added from doc.tw.o
2
Fri 17 of Feb, 2006 02:41 GMT
system
created from structure
1
Select action to perform with checked...
Remove
OK
Switch Theme
Site theme (fivealive-lite/grape)
Default
Amelia
Business
Cerulean
Cosmo
Cyborg
Darkly
Darkroom
Darkshine
Feb12
Fivealive-lite
Fivealive
Flatly
Greenvalley
Journal
Jqui
Lighty
Litera
Lumen
Lux
Materia
Minty
Morph
Ohia
Pulse
Quartz
Sandstone
Simplex
Sketchy
Slate
Solar
Spacelab
Strasa
Superhero
Thenews
Tikicorp
Tikinewt
Tikipedia
United
Utopias
Vapor
Yeti
None
Akebi
Grape
Kiwi
Lemon
Orange
Plum
Raspberry
Watermelon
Switch
Layout
Stay on this page
Default
Fixed top navbar (uses site icon + "topbar" module zone)
Basic Bootstrap
Classic Tiki (3 containers - header, middle, footer)
Tikipedia
Latest Changes
No records to display
...more
Subscribe to Tiki Newsletters!
Delivered fresh to your email inbox!
Don't miss major announcements and other big news!
Site Config
Site upgraded to Tiki 23.x
Sat 24 of Jul, 2021 00:30 GMT
Site upgraded to Tiki 20
Wed 29 of May, 2019 07:57 GMT
We are now on Tiki 19.x
Fri 05 of Oct, 2018 10:02 GMT
Shoutbox module removed
Thu 28 of Jun, 2018 07:01 GMT
We are now on Tiki 18.x
Wed 02 of May, 2018 08:46 GMT
Upgraded to Tiki 17.0
Wed 02 of Aug, 2017 08:19 GMT
Upgraded to Tiki 15.0alpha
Tue 08 of Mar, 2016 13:34 GMT
Site updated to Tiki 14 beta
Tue 21 of Apr, 2015 00:01 GMT
Testing Tiki10
Thu 15 of Nov, 2012 23:06 GMT
Configurable header buttons in XtratoVeil layout
Wed 17 of Oct, 2012 14:54 GMT