Loading...
 
Skip to main content
Include the content of another page with certain changes

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

Tiki Doc From Code error: transclude not found

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>

Show PHP error messages