User Tools

  • Logged in as: anonymous (anonymous)
  • Log Out

Site Tools


mantisbt:page_template_construction

This page describes how to build templates.

Template Construction

Templates are created from small subsections. The following sections are have been built.

  • debug.tpl - a debug stub
  • header.tpl - page top
  • login_header.tpl - bar showing login information
  • menu.tpl - top menu bar
  • footer.tpl - page footer
  • relationship.tpl - bug relationship list
  • sponsorship.tpl - bug sponsorship list

Template Variables

The following objects/arrays are passed to the template:

  • display (array) - controls for overall display
    • browser_cache - true if browser pages can be cached
    • rss_feed_url - URL for news RSS feed
    • rss_url - URL for issues RSS feed
    • javascript_files - array of javascript files to be loaded on page start (javascript/common.js)
    • javascripts - array containing javascript commands to be loaded on page load
    • page_title - string with page title
    • page_top - pointer to file with page top html (needed?)
    • top_align - string for alignment of page top (depending whether user is logged in) (needed?)
    • version - Mantis version string for display
    • webmaster - string for webmaster email (blank in user is logged in) (needed?)
    • row_style - array of styles to rotate through for column delineation
    • col_style - array of styles to rotate through for row delineation
  • login (array) - array if information for user
    • username - string for current user name
    • access_level - enum (int) for current user access level
    • realname - user's real name string
    • anonymous - true if user is anonymous
    • return_page - URL for page to return to
    • signup - true if signup is allowed
  • menu - array of page top links (key points to language string, value is link)
  • jump - javascript to create jump to bug control

Additional information passed by page:

  • bug_view_advanced_page
  • title - formatted page title string
  • bug_last - number of last bug in list
  • bug_next - number of next bug in list
  • bug - link to object containing the bug information
  • show - array of field names (key) with flags (value) indicating whether they are being displayed
  • buglist - array of bugs from last query
  • buttons - list of flags to control display of bug action buttons
    • update_button - show update button
    • assign_button - show assign button
    • assign_button_list - list of userids for assign action
    • change_to_status - list of status values that bug can be changed to
    • change_button - show update button
    • monitor_button - show monitor button
    • monitor_button_label - language string for monitor button
    • monitor_button_action - action field for monitor button
    • child_button - show create child button
    • reopen_button - show re-open button
    • reopen_status - status enum after re-open
    • move_button - show move button
    • delete_button - show delete button
mantisbt/page_template_construction.txt · Last modified: 2008/10/29 04:25 by 127.0.0.1

Driven by DokuWiki