U-M ITS Web Hosting

how to modify the umweb site

home / admin / umweb

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:

  • Try not to link to *.doc forms if a .pdf is available
  • We've chosen to highlight the current section (or page) in the navigation with a prepending arrow -->. The currently viewed page should not have a link back to itself, though the parent pages should always be clickable. Once a user learns how to use the interface, it shouldn't change unless that allows the user to do something incorrect.
  • Make all tags XHTML compliant. This means:
    • All tags must be lowercase, as XML is case-sensitive
    • All tags must be closed. If there is no closing for a tag, then it must be self-closing: <br />
    • The values assigned to a tag must be enclosed in quotes:
      <img src="myimg.png" width="100" height="150" />
    • No tags may be minimized, all values must be assigned:
      <option value="wrong" selected>
      <option value="correct" selected="selected">
    • All tags should be properly nested:
      <b><i>wrong</b></i>
      <i><b>correct</b></i>
    • XHTML documents must be well formed - this means that they must have properly defined html, head, title, and body elements.
    • The document must have a DOCTYPE declaration

    By the way, the header.shtml file should already have a doctype specified, so this addition is not necessary for content files.