Plugin Transclude

Introduced with Tiki6

This wiki plugin includes the content of a wiki page and replaces values in the body of the included page. It is similar to the mediawiki feature transclusion.

Parameters

Include the content of another page with certain changes
Introduced in Tiki 6. Required parameters are in bold.
Go to the source code
Preferences required: wikiplugin_transclude, feature_wiki

Parameters Accepted Values Description Default Since
page pagename Name of the wiki page to use as a template for the values. 6.0

Usage

When the TRANSCLUDE plugin, placed in Page A, fetches the wiki page B, the tag %%%text%%% on Page B is replaced by whatever is inside the TRANSCLUDE tag on Page A.
Furthermore, any other parameters (if they exist in Page B ) will be replaced by their values given in the Transclude plugin on Page A..

Examples

Copy to clipboard
{TRANSCLUDE(page="pageName" key="value" key="value" ...")}text{TRANSCLUDE}


For instance, say we have a todo box page with template like this:

Copy to clipboard
{BOX(class="todo_box", float="right", title="__Todo__ on this page:")} %%%text%%%{BOX}

It will render like this:

Todo on this page:

text


Now, let's use that template page to 'transclude' some todo items on a page:

Copy to clipboard
{TRANSCLUDE(page="todoBox")} * Bring out the garbage * Feed the goldfish {TRANSCLUDE}


All additional parameters will be replaced. For example %%%title%%% will be replaced with the parameter title in the plugin.

Copy to clipboard
{TRANSCLUDE(page="todoBox" title="ToDo")} * Bring out the garbage * Feed the goldfish {TRANSCLUDE}

Issues

%%%title%%% syntax conflicts with the %%% syntax for rendering a line break <br>