Loading...
 
Skip to main content

History: PluginIncludeTpl

Source of version: 10 (current)

Copy to clipboard
            ! Plugin IncludeTpl
''Introduced in ((Tiki15))''

Use this ((wiki plugin)) to include a template file in a page
{maketoc}
!!Parameters
{pluginmanager plugin="includetpl"}
!!Examples
!!!Example 1
''This code:''
{CODE(colors="tiki")}
{includetpl filename="credits.tpl" values="var1:foo&var2:wohoo"}

{CODE}

''Would produce on this site:''
{includetpl filename="credits.tpl" values="var1:foo&var2:wohoo"}

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 -+~np~{$values.var1}~/np~+- and -+~np~{$values.var2}~/np~+- in your Smarty code.

!!! Example 2 with a Wiki Page Template
''You can also use a Smarty template in a wiki page like this:''
{CODE(colors="tiki")}
{includetpl filename="tplwiki:Tpl Page Name" values="var1:foo&var2:wohoo"}

{CODE}
Make sure you give your page -+tiki_p_use_as_template+- permissions and make it only editable by trusted users.

!!Related pages
* ((PluginInclude))

!!Aliases
(alias(Plugin IncludeTpl)) | (alias(Plugin Include Tpl))