Redirected from Deki/Skinning/Archive/Skinning Reference (Variables)
1 of 1 found this page helpful

Skinning Reference (Variables)

    Intro

    Within your PHP template for Deki Wiki, you can inject skinning variables which will populate data from the application.

    Usage

    To output these variables in your template file, embed this code:

    <?php $this->html('VariableName'); ?>

    For example, if I were writing some HTML in my template file:

    <div class="inner-body">
    	<?php $this->html('bodytext'); ?>
    </div>
    

    This little snippet will embed all the bodytext content (if I'm viewing an article, its contents) inside my <div>.  

    Required Variables

    These are required variables to make the wiki function properly.

    Variable Name
    What it does
    Notes
    bodytext Displays the page contents (the text)
    inlinejavascript Loads inline javascript required for functionality Must be in <head></head>
    javascript Loads external javascript required for functionality Load this before any other javascript
    printcss Stylesheets to make the printing UI functional Load before any custom printing styles
    screencss Stylesheets that load default styling to make certain elements work (like the Navigation Tree and the Image Gallery) Load before your custom styling
    customhead
    Loads custom CSS and JS last (overwrites existing functionality)
    Place as last element in your <head></head>
    customtail
    Loads JS at the footer of the page
    Place after </body>
    printoptions
    Displays the print options when you launch the print dialog
    Place before your content

    Optional Variables

    comments
    Markup for the comments feature

    displaypagetitle Displays the page's user-friendly title
    fileaddlink Displays a link + text for attaching a file onto a page Most likely to be deprecated, please do not use
    filecount Displays the number of files attached to a page
    filedisplaycount Modification of {filecount} with additional markup
    filestext Displays files attached to a page
    gallerytext Displays the image gallery
    helpurl
    URL of the help page

    imagecount Number of images attached to a page
    imagedisplaycount Modification of {imagecount} with additional markup
    language
    Language code (example: en-en)

    lastmod TODO: Last modified info
    lastmodhuman TODO: Last modified info
    lastmodby TODO: Last modified info
    logo Displays logo set in control panel with link to home page
    loginurl Displays the URL to the login page
    logouturl Displays the URL to the logout page
    pageattach
    Returns a link with text to trigger the attach file/images dialog
    Example: <a href="#" onclick="return doPopup();" class="disabled">Attach file</a>
    pageadd
    Returns a link with text to trigger creating a new page See above
    pagedelete
    Returns a link with text to trigger the delete page dialog See above
    pageedit
    Returns a link with text to trigger the editor See above
    pageemail
    Returns a link with text to trigger the email page feature

    pageismoved
    A boolean if this page is redirecting elsewhere

    pagemovelocation
    Final location of the page's move

    pagemovemessage
    If page is redirected, a textual message

    pagemove
    Returns a link with text to trigger the move dialog See above
    pagename
    A CSS-friendly name of this page

    pageprint
    Returns a link with text to trigger the print dialog See above
    pagerestrict
    Returns a link with text to trigger the restrict dialog See above
    pagetoc
    Returns a link with text to trigger the toc menu See above
    pagetype
    Returns a space separated list of page types: page-admin, page-special, page-user, page-home, user-loggedin, user-admin
    Useful as an ID selector on templates
    pagewatch
    Returns a link with text to trigger the watch feature

    pathcommon The path to the common skins folder which contains the default CSS, JS, and images for DekiWiki Example: /skins/common
    pathskin The path to the skin with the template in the path Example: /{TemplateName}/{SkinName}
    pagetitle
    <title> friendly version of page's title

    pathtpl The path to the template Example: /{TemplateName}
    poweredbytext
    A "Powered by Deki WikI" phrase

    resetcss Stylesheet to "reset" all browsers styles (from YUI) Load this before any other stylesheets
    registerurl
    Registration URL

    sitenavtext
    Displays navigation page HTML

    skinname #TODO
    subtitle #TODO
    tagstext Displays tags associated on this page
    toc Displays the page's table of contents
    undelete #TODO
    stylename #TODO
    username Displays the current username
    userpage #TODO
    userpageurl Displays the URL to the current user's homepage
    customarea{#}
    Inserts custom HTML
    See Custom HTML

    Was this page helpful?
    Tag page
    Viewing 1 of 1 comments: view all
    Could they also be used in the Custom HTML Sections?
    I tried using 'username' and did not work.
    Posted 07:34, 23 Jan 2008
    Viewing 1 of 1 comments: view all
    You must login to post a comment.

    Copyright © 2011 MindTouch, Inc. Powered by