History: PluginTransclude
Source of version: 17 (current)
Copy to clipboard
# 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 [http://en.wikipedia.org/wiki/Wikipedia:Transclusion|transclusion]. ## Parameters {pluginmanager plugin="transclude"} ### Usage When the TRANSCLUDE plugin, placed in Page A, fetches the wiki page B, the tag `~np~%%%text%%%~/np~` 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 {CODE(colors="tiki")}{TRANSCLUDE(page="pageName" key="value" key="value" ...")}text{TRANSCLUDE}{CODE} For instance, say we have a todo box page with template like this: {CODE(colors="tiki")}{BOX(class="todo_box", float="right", title="__Todo__ on this page:")} %%%text%%%{BOX}{CODE} It will render like this: {BOX(class="todo_box", float="right", title="**Todo** on this page:")} <br />text<br />{BOX} %clear% Now, let's use that template page to *'transclude*' some todo items on a page: {CODE(colors="tiki")}{TRANSCLUDE(page="todoBox")} * Bring out the garbage * Feed the goldfish {TRANSCLUDE}{CODE} All additional parameters will be replaced. For example `~np~%%%title%%%~/np~` will be replaced with the parameter title in the plugin. {CODE(colors="tiki")}{TRANSCLUDE(page="todoBox" title="ToDo")} * Bring out the garbage * Feed the goldfish {TRANSCLUDE}{CODE} ## Issues `~np~%%%title%%%~/np~` syntax conflicts with the `~np~%%%~/np~` syntax for rendering a line break ` ` ## Related pages - See more examples at http://www.ogre3d.org/tikiwiki/Help+-+Wiki+Plugins#a6df121fca50fcac3ee350341950ac9e3 - ((PluginInclude)) - similar plugin that includes content from other pages, but without changes