1 of 1 found this page helpful

Wiki.Page

    wiki.Page(path : str, section : str?, revision : num?, show : bool?, heading : int?) : xml  
    

    Include a wiki page.

    This function is only for page inside the wiki.

    Usage Restrictions

    1.8.1 or later

    Parameters

    Name Type Description
    path str Path of a given wiki page.
    section str? Section name (optional, default: none)
    revision num?

    page revision to use
    0 is the head revision
    > 0 is a specific revision (e.g. 1 is the first revision)
    < 0 is revision relative to head revision (e.g. -1 is the previous revision)
    (optional, default: head revision, 8.05.2b or later)

    show bool? show page/section title of included page (optional, default: no, 9.02 or later)
    heading int?

    set page/section title heading and adjust all sub-headings accordingly; the adjustment is applied even when the page/section heading is not shown
    range: 0-5, where 0 is 'Title' style, 1 is 'Heading 1', and so forth;
    (optional, default: keep original headings, 9.02 or later)

    Result

    The wiki page or wiki page section.

    Samples

         Output

    To display the contents of a given wiki page:

    {{wiki.page("/Community/On_the_name%3a_MindTouch_vs._MindTouch_Deki_vs._MindTouch_Deki_Wiki") }} 

        

    Overview

    "MindTouch YYYY" is the name for the commercial version of MindTouch Deki. For example, "MindTouch 2009" is a commercial version that is derived from the open source Lyons release. MindTouch Deki refers to the API+UI

    As MindTouch has evolved, our application has been gone through numerous name changes as well as the way we version each release. This document outlines the history of the name, and some justification. This document will go track the change in reverse chronological order.

    March 2009: Bifurcation of commercial vs. open source in name

    For the Lyons (9.02) release, the commercial version of MindTouch Deki simply became known as "MindTouch 2009." Open source versions will continue to utilize the "MindTouch Deki" name for the immediate future. 

    2008: "MindTouch Deki Wiki" becomes "MindTouch Deki"

    In an effort to further highlight the underlying architecture of the MindTouch Deki Wiki platform and its capabilities in mashing up data at a non-UI level, the "wiki" component of the product was dropped.  "MindTouch Deki Wiki" simply became known as "MindTouch Deki."

    2007: Hardware appliance becomes "MindTouch Deki Wiki"

    MindTouch originally created a hardware appliance: at various points of its existence, it was called "MKS" (MindTouch Knowledge Server), "MOSS", and DekiBox. After the hardware idea was dropped, the software component was called "MindTouch Deki Wiki."

     

    To display the contents of a given wiki page section:

    {{wiki.page("/Community/On_the_name%3a_MindTouch_vs._MindTouch_Deki_vs._MindTouch_Deki_Wiki", "Overview") }} 

        

    "MindTouch YYYY" is the name for the commercial version of MindTouch Deki. For example, "MindTouch 2009" is a commercial version that is derived from the open source Lyons release. MindTouch Deki refers to the API+UI

    As MindTouch has evolved, our application has been gone through numerous name changes as well as the way we version each release. This document outlines the history of the name, and some justification. This document will go track the change in reverse chronological order.

    Was this page helpful?
    Tag page
    Viewing 15 of 15 comments: view all
    In 8.0.5, if you foolishly try to include a section reference and do not have a section on the target page, the function provides a link to the page. I am making a glossary and I use a page title as the glossary entry and the body, no headings, as the definition. When I used the wiki.page function correctly and omitted the section reference (to the non-existing section), the target content was transcluded correctly.
    Posted 10:50, 11 May 2008
    Actually, I think it's a bug. I just tested again and even if you use the function correctly (and point to an existing section), only a link to the page appears. The section content is not transcluded.
    Posted 07:06, 25 Jul 2008
    Reply to bohappa comment #2. For anyone else running into page transclusion problems and Mindtouch Deki 8.05.2a, I found a workaround to this problem. Our wiki was having this issue with both wiki.page() and wiki.template(). This fix for us was to replace the spaces (i.e. " ") in page paths with an underscore (i.e. "_"). For example, change wiki.page("My Page") to wiki.page("My_Page").
    Posted 14:10, 29 Jul 2008
    Well done, rawlinc. In 8.0.8, section transclusion works but for some reason this bit is being treated as text when it's transcluded and is not processed: {{ web.list(uri.build(page.api, "revisions", { revision: 1 }), "/page/user.author/username")[0] }}
    Posted 15:44, 10 Sep 2008
    I read some month ago that there are some css classes that control how included page parts are displayed or not. I searched wiki and forums but didn't find it. Could anyone help me to remember the class name and behaviors? Are thei still valid in Lyons? edited 15:57, 10 May 2009
    Posted 15:56, 10 May 2009
    If section name contains more than one word, do not use underscores in section name, e.g. Feature Description (NOT Feature_Description). edited 15:30, 5 Jul 2009
    Posted 10:41, 9 Jun 2009
    You must use the path, without the site uri. For example:
    wiki.page (user.uri)
    wont work, but
    wiki.page (user.homepage.path)
    will.
    Posted 16:25, 16 Jun 2009
    is it possible to use a relative path instead of an absolute one? I have a feeling (have not tried yet) that moving a page that refers to, or is referred by wiki.page will break the link.
    Posted 14:47, 22 Oct 2009
    yes, you can use relative path if you start it with ".". For example, wiki.page("./my-sub-page"). The inclusion will continue to work even if you move the sub-page, as long as you don't delete the redirect that was automatically created for it.
    Posted 19:37, 22 Oct 2009
    Is there any way to display content just like this does, but from another, external MindTouch wiki?
    Posted 23:31, 12 Apr 2010
    For the show parameter I think it is confusing when the text says 'default is no' when the boolean operators are true and false. Saying 'default is false' would be more explicit.
    Posted 20:34, 10 Oct 2010
    @SteveB - I've got the same question as comment #11! Any ideas? I'm getting a new organisation up to speed with MindTouch, and it would be great to pull some bits out of developer.mindtouch.com into the pages. Of course I could always Copy / Paste...
    Posted 14:01, 23 Mar 2011
    @travellingwithoutmoving you could use web.html with an xpath expression to just select the content you actually want to display
    Posted 08:45, 24 Mar 2011
    @SteveB That's great Steve. I was sure there was a solution there somewhere... There usually is with MindTouch!
    Posted 12:17, 24 Mar 2011
    @SteveB I'm pulling a bunch of content from a number of pages, currently using multiple calls to Wiki.Page because I need to pull specific sections, and also adjust the page headings down a level on the new page. In order to avoid 10+ calls to Wiki.Page for each actual page (assumption being that database calls are expensive), is there a way to load the target page into a variable, and then direct Wiki.Page (or something similar) to it (assumption being that variable references are less expensive) (since I'm making 10+ calls per page for each of 13 sub-pages, every little bit helps)? I guess, really, I'm asking if the first parameter to Wiki.Page can be a variable containing XML, instead of a path?
    Posted 16:00, 15 Dec 2011
    Viewing 15 of 15 comments: view all
    You must login to post a comment.

    Copyright © 2011 MindTouch, Inc. Powered by