1 of 1 found this page helpful

Transclude a page, a page section, or other content with DekiScript

    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.  

    Design Considerations

    • If you restrict access in your site, you must create content to be reused in a location that all intended audiences can access. For example, if you make a glossary that includes common definitions. You can create a glossary area in your site. You can then transclude individual terms on privates pages for targeted groups. 
    • Content to be transcluded has to be accessible via wiki.page.

    Transcluding a Page

     To transclude content from another page, add this DekiScript to a page:

    {{wiki.page(“path to page”)}}

    Transcluding a Page Section

    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") }} 

    Transcluding Other Content

    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:

    1. Make sure the target content has an ID. To transclude a table, edit the source an add an ID property.
    <table id="MyTable" cellspacing="1" cellpadding="1" width="200" border="1">
    1.  In the target location, add wiki.page to define the content to be transclued. The example below embeds the table defined in the first step.
    {{ wiki.page("Path to Page")["//table[@id='MyTable']"] }} 
    Was this page helpful?
    Tag page
    Viewing 1 of 1 comments: view all
    How can I limit the number of transcluded characters???
    Posted 07:31, 28 Nov 2009
    Viewing 1 of 1 comments: view all
    You must login to post a comment.

    Copyright © 2011 MindTouch, Inc. Powered by