Template Documentation

The core template itself consists of .top.inc, .bottom.inc (and .coursebottom.inc for course pages) to create the basic structure, and md.php and Parsedown.php which handle Markdown rendering. Don't touch any of the core files. The other files are used to configure the site:

Using Markdown

Thanks to some .htaccess magic, any file in the site structure saved with an .md extension will get run through a PHP Markdown parser. The only little issue is that you have to go to the page without the .md extension, otherwise it will serve up the raw file. This also means that your index file must be PHP, not Markdown.

Template Config Options & Template Variables

The .config.inc file is filled with php DEFINE statements that control the template. All of these options are subdirectory-specific - if you copy your .config file to a subdirectory, you can override the settings for the pages in that directory. These can all be referenced in the site content as well.

ROOT
This needs to be set to the root URL of the site.
ASSETS
This is the URL for the folder that all the images and other files for the site will go in to.
LAB
This is the name of the lab that gets displayed in the site title.
THEME
This sets the color scheme of the site. These themes are (more or less) derived from the Marketing & Media Purdue Brand Colors. Suggestions for additional themes will be taken under consideration.
  • paper is about as plain, simple, black-on-white as it gets
  • boilerwhite has some Purdue Old Gold accents on a white background
  • blackngold has a black background with white text & gold accents
  • moon is a brown & warm grey theme.
  • sky is a light blue & white theme.
  • lawn is green & leafy.
PANELED
If this is true, the site content will be contained in a white box instead of up against the themed background
FLUID
If this is true, the site will take up the full width of the screen.
TOP
If this is true, the content from .title will be placed at the top of every page.
NAVLAYOUT
This controls the placement of the navigation menu. You can put multiple navigation menus on a page by using a comma separated list of these options.
  • top puts a full-width navbar under the title section
  • detached puts a navbar above the page content
  • left puts a navigation menu on the left side of the page
  • right puts a navigation menu on the right side of the page

In addition to the above settings, a course page needs the following 2 constants defined:

COURSE
Something along the lines of ME 999
COURSETITLE
The actual name of the course

Purdue University, 610 Purdue Mall, West Lafayette, IN 47907, (765) 494-4600

© 2019 Purdue University | An equal access/equal opportunity university | Copyright Complaints | Maintained by Mechanical Engineering Technical Services

Trouble with this page? Disability-related accessibility issue? Please contact us at mecl@purdue.edu.