Was this page helpful?

Site, Page, and User Variables Examples

    Site Variables

    Function Description
    site.name : str
    Site name.
    site.host : str
    Site host name.
    site.uri : uri
    Site URI.
    site.language : str
    Site language code.
    site.api : str
    Site API URI.
    {{site.name}}  

    Yields: 

    MindTouch Community Portal

    {{site.host}}  

    Yields: 


    {{site.uri}}  

    Yields: 

    http://developer.mindtouch.com/

    {{site.language}}  

    Yields: 

    en-us

    {{site.api}}  

    Yields: 

    http://developer.mindtouch.com/@api/deki

    Page Variables

    Function Description
    page.title : str
    Title of the current page.
    page.path : str
    Path of the current page.
    page.namespace : str
    Namespace of the current page.
    page.toc : xml
    Table of content for the current page.
    page.uri : str
    URI of the current page.
    page.viewcount : num
    View counter for the current page.
    page.name : str Name of the current page.
    page.language : str The language on the current page.
    page.api : uri The API of the current page.
    page.mime : str The mime type of the current page.
    page.user : map The users that created the current page name and information.
    page.subpages : map The subpages that stem from the current page.
    page.comments : map The comments for the current page.
    page.files : map The files attached to the current page.
    page.tags : map The tags attached to the current page.
    page.content : str The content of the current page.
    page.parent : map The parent content of the current page.
    {{page.title}}  

    Yields: 

    Site, Page, and User Variables Examples

    {{page.path}}  

    Yields: 

    en/docs/DekiScript/Reference/Wiki_Functions_and_Variables/Site,_Page,_and_User_Variables_Examples

    {{page.namespace}}  

    Yields: 

    {{page.namespace}}  

    Yields: 

    {{page.toc}}  

    Yields: 

    {{page.uri}}  

    Yields: 

    http://developer.mindtouch.com/en/docs/DekiScript/Reference/Wiki_Functions_and_Variables/Site%2C_Page%2C_and_User_Variables_Examples

    {{page.viewcount}}  

    Yields: 

    6113

    {{page.name}}  

    Yields: 

    Site,_Page,_and_User_Variables_Examples

    {{page.language}}  

    Yields: 

     

    {{page.api}}  

    Yields: 

    http://developer.mindtouch.com/@api/deki/pages/3204

    {{page.mime}}  

    Yields: 

    application/x.deki0702+xml

    {{page.subpages}}  

    Yields: 

    { }

    {{page.comments}}  

    Yields: 

    [ { author : "local://8be0fa3289404f99a6b6f218cc6cbaba/deki/$user", date : "Mon, 04 Apr 2011 10:29:22 GMT", mime : "text/plain; charset=utf-8", number : 1, page : "local://8be0fa3289404f99a6b6f218cc6cbaba/deki/$page", text : "{{user.page}} does not work in my Mindtouch version 10.0.4.", uri : "local://8be0fa3289404f99a6b6f218cc6c...ki/$commenturi" } ]

    {{page.files}}  

    Yields: 

    { }

    {{page.tags}}  

    Yields: 

    { "date:2008-06-08" : { definition : nil, name : "date:2008-06-08", pages : "local://8be0fa3289404f99a6b6f218cc6cbaba/deki/$tagged", prefix : "date:", type : "date", value : "2008-06-08" }, "test tag" : { definition : nil, name : "test tag", pages : "local://8be0fa3289404f99a6b6f218cc6cbaba/deki/$tagged", prefix : "", type : "text", value : "test tag" } }

    {{page.content}}  

    Yields: 

    {{page.parent}}  

    Yields: 

    { api : "http://developer.mindtouch.com/@api/deki/pages/10432", author : "local://8be0fa3289404f99a6b6f218cc6cbaba/deki/$user", comments : "local://8be0fa3289404f99a6b6f218cc6c.../$pagecomments", contents : "local://8be0fa3289404f99a6b6f218cc6c.../$pagecontents", date : "Wed, 30 Sep 2009 22:08:14 GMT", editsummary : "Reverted to earlier version; 5 words added", feed : "http://developer.mindtouch.com/@api/...ges/10432/feed", files : "local://8be0fa3289404f99a6b6f218cc6cbaba/deki/$files", fronturi : "http://developer.mindtouch.com/en/docs/DekiScript/Reference/Wiki_Functions_and_Variables", id : 10432, ishidden : False, language : nil, mime : "application/x.deki0805+xml", name : "Wiki_Functions_and_Variables", namespace : "", parent : "local://8be0fa3289404f99a6b6f218cc6cbaba/deki/$page", parents : "local://8be0fa3289404f99a6b6f218cc6c.../deki/$parents", path : "en/docs/DekiScript/Reference/Wiki_Functions_and_Variables", properties : "local://8be0fa3289404f99a6b6f218cc6c...eki/$pageprops", rating : "local://8be0fa3289404f99a6b6f218cc6cbaba/deki/$rating", redirect : nil, revision : 58, revisions : "local://8be0fa3289404f99a6b6f218cc6c...eki/$revisions", subpages : "local://8be0fa3289404f99a6b6f218cc6c...deki/$subpages", tags : "local://8be0fa3289404f99a6b6f218cc6c...deki/$pagetags", talkuri : "http://developer.mindtouch.com/Talk:en/docs/DekiScript/Reference/Wiki_Functions_and_Variables", text : "local://8be0fa3289404f99a6b6f218cc6c...deki/$pagetext", title : "Wiki Functions and Variables", toc : "local://8be0fa3289404f99a6b6f218cc6c.../deki/$pagetoc", unprefixedpath : "en/docs/DekiScript/Reference/Wiki_Functions_and_Variables", uri : "http://developer.mindtouch.com/en/docs/DekiScript/Reference/Wiki_Functions_and_Variables", viewcount : "local://8be0fa3289404f99a6b6f218cc6c...$pageviewcount", xml : "local://8be0fa3289404f99a6b6f218cc6c.../deki/$pagexml" }

     

     

    User Variables

    Function Description
    user.id ID of the current user.
    user.name Name of the current user.
    user.uri URI for user's page.
    user.api : str API for user's page.
    user.page : xml A list of the user's pages.

    {{user.id}}  

    Yields: 

    754

    {{user.name}}  

    Yields: 

    Anonymous

    {{user.uri}}  

    Yields: 

    http://developer.mindtouch.com/User:Anonymous

    {{user.api}}  

    Yields: 

    http://developer.mindtouch.com/@api/deki/users/754

    {{user.page}}  

    Yields: 

     

     

    Was this page helpful?
    Tag page
    Viewing 1 of 1 comments: view all
    {{user.page}} does not work in my Mindtouch version 10.0.4. edited 03:08, 4 Apr 2011
    Posted 02:29, 4 Apr 2011
    Viewing 1 of 1 comments: view all
    You must login to post a comment.

    Copyright © 2011 MindTouch, Inc. Powered by