Fullscreen
[Show/Hide Right Column]

Introduction to the use and customization of Smarty Templates
This should be moved to themes.tiki.org
-> No, I do not thing so. I feel, smarty shuld be mentioned in the docs and being referred to themes.t.o and to smarty.net sites, as it is. It is a small page and I already found it helpful like it is. --ToF <-



Smarty Templates

Tiki CMS/Groupware uses the Smarty Template Engine to control themes.



"One of Smarty's primary design goals is to facilitate the separation of application code from presentation. Typically, the application code contains the business logic of your application, written and maintained in PHP code. This code is maintained by programmers. The presentation is the way your content is presented to the end user, which is written and maintained in template files. The Templates are maintained by template designers."

http://www.smarty.net/whyuse.php

Smarty is a "Template/Presentation Framework." It provides the designer with the opportunity to change the presentation of a website by defining variables and using logic (If/else) statements. It can be used for example to create WYSIWYCA ("what you see is what you can access") websites which show or hide things depending on permissions variables.


Default Templates and Custom Templates

The default Smarty template files are in the folder /Templates as .tpl files. They can be edited with any text editor, but it is best to not edit the default version of these templates.

If you want to modify a template, copy it and put the copy in a custom theme directory, e.g. /templates/styles/custom_theme_name/

See Themes ("How To Create a Custom Theme") for more details.

Tips

  • use the {literal} {/literal} tag to escape Smarty parsing for a block of code, e.g. for a javascript
  • {* comment *} is used for commenting in smarty
  • {tr}some text{/tr} is used for strings in the UI that are intended to be translated into other languages (see Internationalization).

More information


Alias



Contributors to this page: Torsten Fabricius1845 points  , Marc Laporte9146 points  , lindon137 points  , Gary Cunningham-Lee1539 points  , mlpvolt4388 points  , Scot Wilcoxon684 points  , TheDoc27 points  , Xavi67984 points  , carcajou3 points  , xavidp1213 points  , jasondiceman5 points  and system .
Page last modified on Friday 09 March, 2012 16:26:49 UTC by Torsten Fabricius1845 points .
The content on this page is licensed under the terms of the Creative Commons Attribution-ShareAlike License.

Site Language

Reference Guide

Keywords

These keywords serve as "hubs" for navigation within the Tiki documentation. They correspond to development keywords (bug reports and feature requests):


Tiki Newsletter

Delivered fresh to your email inbox!
Newsletter subscribe icon
Don't miss major announcements and other news!
Contribute to Tiki