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 <-
-> 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.Table of contents
"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
- http://www.smarty.net/crashcourse.php: Crash Course in Smarty
- http://www.smarty.net/manual/en/: Smarty Manual
- http://themes.tiki.org - a resource for tiki theme designers.
