1 of 2 found this page helpful

Wiki.Toc

    Table of contents
    1. 1. Usage Restrictions
    2. 2. Parameters
    3. 3. Result
    4. 4. Samples
    wiki.toc(path : str, depth : num?) : xml 
    

    Insert table of contents of a wiki page.

    Usage Restrictions

    1.8.1 or later

    Parameters

    Name Type Description
    path str path to the page
    depth num? limit depth of headings in table of contents
    (optional, default: all, 9.12 or later)

    Result

    A list of that page's table of contents.  If path corresponds to the current page, then this function returns the same result as page.toc.  Prior to 8.08, wiki.toc would always load the target page, even when it is the same as the current page.

    Samples

      Output

    To pull the table of contents from a page:

    {{wiki.toc("/Community/Defragcon") }} 

     

    page not found
    Was this page helpful?
    Tag page
    Viewing 2 of 2 comments: view all
    There should be an example showing depth.
    Posted 19:38, 19 Jan 2011
    Here is an example showing depth {{ wiki.toc{path: "./", depth: "1"} }}
    Posted 15:19, 20 Jan 2011
    Viewing 2 of 2 comments: view all
    You must login to post a comment.

    Copyright © 2011 MindTouch, Inc. Powered by