Warning: Undefined variable $filepath in /home/tiki-doc/public_html/lib/wiki-plugins/wikiplugin_tikidocfromcode.php on line 146
Include a Smarty or wiki template file in a page | Documentation for Tiki Wiki CMS Groupware
Loading...
 
Skip to main content
Include a Smarty or wiki template file in a page

Plugin IncludeTpl

Introduced in Tiki15

Use this wiki plugin to include a template file in a page

Parameters

Tiki Doc From Code error: includetpl not found

Examples

Example 1

This code:

Copy to clipboard
{includetpl filename="credits.tpl" values="var1:foo&var2:wohoo"}


Would produce on this site:
Theme: Fivealive-lite/Kiwi

If you use in your tpl the variables var1 and var2 (as in this example), they would get their values set in the corresponding plugin parameters above (foo and wohoo, correspondingly).

To use those values in a template you would use {$values.var1} and {$values.var2} in your Smarty code.

Example 2 with a Wiki Page Template

You can also use a Smarty template in a wiki page like this:

Copy to clipboard
{includetpl filename="tplwiki:Tpl Page Name" values="var1:foo&var2:wohoo"}

Make sure you give your page tiki_p_use_as_template permissions and make it only editable by trusted users.

Aliases

Plugin IncludeTpl | Plugin Include Tpl