|
The umweb site is organized in a templating framework solely using
Apache-based SSI includes and logic. Most of the logic framework
files are located in the pieces directory to isolate and centralize
display and logic as well as keep content files free
from user interface concerns.
|
|
Working with the framework
|
|
In order to work within the framework, all content
files must have these lines at the top:
<!--#set var="title" value="mytitle" -->
<!--#set var="trail" value=".." -->
<!--#include virtual="$trail/pieces/template-top.shtml" -->
and this at the bottom:
<!--#include virtual="$trail/pieces/template-bottom.shtml" -->
|
|
Explaining the required elements
|
|
The required elements start off by assigning the
individual page variables and then including the
template parts. We've split up the template into two
parts so that a separate content-only file would not be
necessary, yet the content could be thrown into the table-based
template.
The title variable is used in many places such as:
- header title tag
- de-linking the current page in the navigation
- determining which (if any) sub-navigation to pull up
- labeling the content part of the page with a title
- labeling the current position in the breadcrumb trail
- pulling the last modified date for the proper file
The trail variable maintains orientation within
the file structure. It is used for:
- finding the logic pages
- placing the proper path for links in the main and sub
navigation
- placing the proper path for links in the breadcrumb trail
- finding the images directory
Please don't use trailing slashes in the "trail" variable -
all references are expecting it to not be there, and it could
break some links, images, etc.
|
|
Page Variables
|
|
Other commonly used optional variables are:
- parent - if this is a sub-section page, and you want
the parent to be reflected in the navigation.
- grand_parent - if this is a 34rection page, and you want
the parent to be reflected in the navigation.
- long_title - if you want a longer title/header for
your page that's too long for navigation and the html header
title tag.
- header_inc - the name of a file with content to be
included in the page header (such as javascript for the contact
page)
Other variables are defined for centralization. This
way, the template framework can be modified in one
place, and reflected everywhere. These variables are set at the
beginning of pieces/template-top.html, any hex colors should include
the pound sign.
- sub_color - the sub-navigation box background color
- flavor_color - the background color of the main nav and
sub-header boxes
For demonstration purposes, here are this page's variables:
- title = umweb
- trail = ..
- parent = admin
- long_title = how to modify the umweb site
- sub_color = #ffee00
- header_inc = (none)
|
|
Elements of the framework
|
|
Within the pieces directory, there are many templating files.
- header.shtml - contains the html head info and the
logo title table
- template-top.shtml - contains the top half of the
html layout and structure.
- template-bottom.shtml - contains the bottom half of
the html layout and structure. (there is no separate footer,
that has been included into the above)
- navigate.shtml - the logic controlling the navigation
table. Also pulls in the appropriate sub-nav file, if needed.
Other items in the pieces directory:
- styles.css - This is included in the header.shtml
- sub-nav (directory) - much the same as navigate, but
only for sub-nav files. Items here are named after the parent page.
|
|
Standards
|
|
Please try to keep these standards in mind when editing pages:
|