DekiScript allows you to transclude a page, a page section, or any element that can be referenced using an XPath expression, in another page. This is helpful if you want to define information once and reuse it globally. Some common usages of this are for glossaries, product catalogs, and reference data.
To transclude content from another page, add this DekiScript to a page:
{{wiki.page(“path to page”)}}
To transclude a section, pass the path and the section name. A page section is any part of a page under a H2, H3, H4, or H5 heading. Here’s an example:
{{wiki.page("/Product_Management/Feature_Lists", "Module A List") }}
You can transclude any content that can be accessed using an XPath expression. The targeted content must have an ID or be identified by class. The example below shows how to transclude a table.
To transclude other content, do the following:
<table id="MyTable" cellspacing="1" cellpadding="1" width="200" border="1">
{{ wiki.page("Path to Page")["//table[@id='MyTable']"] }}
| Images 0 | ||
|---|---|---|
| No images to display in the gallery. |
Copyright © 2011 MindTouch, Inc. Powered by