Table of Contents

Page Template Requirements

Author: Glenn Henshaw (thraxisp)

Introduction

Mantis pages are currently hard coded as php files with embedded HTML and a smattering of CSS. In many cases, the page itself determines the presentation based on the current user's access level and system parameters. There are also several pages that are graphically close to each other or related. This construction makes it difficult to modify the overall look and feel of a site, or to add or delete fields.

The construction of the code will be reviewed to separate the business logic (feature interactions and user capabilities), and presentation.

The general implementation will have the following attributes:

Implementation Notes

The implementation consists primarily of removing display statements from the existing code. This work is significant as much of the code embeds the display function at lower levels.

Development of this feature will be done on a branch from the 1.1 stream. This will allow normal development to proceed while the core is reworked. The code will eventually be folded back into the main stream. The branch is labelled 'EXP_TEMPLATE'.

Database Changes

Template Construction

File Structure

|- mantis
    + core
    |   +- smarty (smarty dir, changeable)
    + languages
    |      +- eng
    |      +- etc....
    + themes
    |      +- theme1
    |          +- header.tpl
    |          +- footer.tpl
    |          +- page.tpl
    |          +- images
    |              +- image.png
    |          +- css
    |              +- mantis.css
    |      +- theme2
    |          +- page.tpl
    + themes_c    (compiled templates)
    |      +- theme1
    |          +- header.php
    |          +- footer.php
    |          +- page.php
    |      +- theme2
    |          +- page.php

Configuration

Implementation Log

Other Changes

Feedback

Please add your comments and feedback in this section.