Loading...
 

Templates Best Practices

 Warning
1. The content of this page is mostly obsolete. 2. Should this be on themes.tiki.org instead as per Where ?

Smarty

Tiki uses Smarty template engine

HTML

Minimal Conforming HTML5 Template
Copy to clipboard
<!DOCTYPE html> <html> <head> <title>Conforming HTML5 Template</title> </head> <body> </body> </html>

General layout of a template:

Tiki's main template file is tiki.tpl

Tiki CSS Layout schema


 Plugin Image
No image specified. One of the following parameters must be set: fileId, randomGalleryId, fgalId, attId or src.

Older stuff

[+]

Template includes

Title

Smarty : templates/tiki-edit_blog.tpl
Copy to clipboard
{title help="Blogs" url="tiki-edit_blog.php?blogId=$blogId" admpage="blogs"} {tr}Edit Blog:{/tr} {$title}{/title}

Find

Smarty : templates/tiki-admin_forums.tpl
Copy to clipboard
{if $channels or ($find ne '')} {include file='find.tpl' _sort_mode='y'} {/if}


Include TPL

Smarty : templates/tiki-view_tracker.tpl
Copy to clipboard
{include file='tracker_item_field_input.tpl'} <= Using simple quote calling TPL without variable {include file="$checkbox.tpl"} <= Using double quote when calling TPL with variable

Remarksbox

Smarty : tiki-mods.tpl
Copy to clipboard
{remarksbox type="tip" title="{tr}Tip{/tr}"} {tr}Tiki "mods" are additional features not included in the public release. Learn more at <a target="tikihelp" href="htt+p://mods.tiki.org">mods.tiki.org</a>.{/tr} {/remarksbox}

Buttons

Smarty : tiki-syslog.tpl
Copy to clipboard
<div class="navbar"> or <div id="page-bar"> {button _text="{tr}Log SQL{/tr}" href="tiki-sqllog.php"} </div>


or (if not in navbar or page-bar)

Smarty : tiki-syslog.tpl
Copy to clipboard
{button _text="{tr}Log SQL{/tr}" href="tiki-sqllog.php"}

Tables

Definition of a table

Smarty : tiki-syslog.tpl
Copy to clipboard
{cycle values="even,odd" print=false} <table class="normal"> <tr class="head"> <th>......</th> </tr> <tr class="{cycle}"> <td>.......</td> </tr> ... </table>

Table can have different classes

  • normal: is usually a 100% large, with a border, the table is used to list items
  • formcolor: is usually a 100% large, with a border, the table is used in a form

td classes and styles

td can have a class depending of the type of the content

  • checkbox: for a column with checkboxes for selecting some values
  • action: for a list of action (usually can not be wrapped - or have a limited size
  • char: for a single character e.g. {text-align: right}
  • integer: {text-align: right}
  • icon: for one icon
  • email: {text-align: "@"}
  • floatnum: {text-align: "."}
  • date: ...should we add "longdate" and "shortdate" ?
  • username: for names. E.g in bold
  • norecords: for table with no records
  • id: for id {text-align: center}
  • ...


By default a td with no class is for text = left align

Notes:

  • Avoid inline styles if possible (inline styles are possible if they are required to keep the page structure consistent). No inline style should specify size, colour or fonts.


Alias

Related

http://themes.tiki.org/Template+Tricks

Keywords

The following is a list of keywords that should serve as hubs for navigation within the Tiki development and should correspond to documentation keywords.

Each feature in Tiki has a wiki page which regroups all the bugs, requests for enhancements, etc. It is somewhat a form of wiki-based project management. You can also express your interest in a feature by adding it to your profile. You can also try out the Dynamic filter.

Accessibility (WAI & 508)
Accounting
Administration
Ajax
Articles & Submissions
Backlinks
Banner
Batch
BigBlueButton audio/video/chat/screensharing
Blog
Bookmark
Browser Compatibility
Calendar
Category
Chat
Comment
Communication Center
Consistency
Contacts Address book
Contact us
Content template
Contribution
Cookie
Copyright
Credits
Custom Home (and Group Home Page)
Database MySQL - MyISAM
Database MySQL - InnoDB
Date and Time
Debugger Console
Diagram
Directory (of hyperlinks)
Documentation link from Tiki to doc.tiki.org (Help System)
Docs
DogFood
Draw -superseded by Diagram
Dynamic Content
Preferences
Dynamic Variable
External Authentication
FAQ
Featured links
Feeds (RSS)
File Gallery
Forum
Friendship Network (Community)
Gantt
Group
Groupmail
Help
History
Hotword
HTML Page
i18n (Multilingual, l10n, Babelfish)
Image Gallery
Import-Export
Install
Integrator
Interoperability
Inter-User Messages
InterTiki
jQuery
Kaltura video management
Kanban
Karma
Live Support
Logs (system & action)
Lost edit protection
Mail-in
Map
Menu
Meta Tag
Missing features
Visual Mapping
Mobile
Mods
Modules
MultiTiki
MyTiki
Newsletter
Notepad
OS independence (Non-Linux, Windows/IIS, Mac, BSD)
Organic Groups (Self-managed Teams)
Packages
Payment
PDF
Performance Speed / Load / Compression / Cache
Permission
Poll
Profiles
Quiz
Rating
Realname
Report
Revision Approval
Scheduler
Score
Search engine optimization (SEO)
Search
Security
Semantic links
Share
Shopping Cart
Shoutbox
Site Identity
Slideshow
Smarty Template
Social Networking
Spam protection (Anti-bot CATPCHA)
Spellcheck
Spreadsheet
Staging and Approval
Stats
Survey
Syntax Highlighter (Codemirror)
Tablesorter
Tags
Task
Tell a Friend
Terms and Conditions
Theme
TikiTests
Federated Timesheets
Token Access
Toolbar (Quicktags)
Tours
Trackers
TRIM
User Administration
User Files
User Menu
Watch
Webmail and Groupmail
WebServices
Wiki History, page rename, etc
Wiki plugins extends basic syntax
Wiki syntax text area, parser, etc
Wiki structure (book and table of content)
Workspace and perspectives
WYSIWTSN
WYSIWYCA
WYSIWYG
XMLRPC
XMPP




Useful Tools