Template Menu & Content

Page address: http://www.mnsu.edu/its/web/template/documentation/archive/menucontent.html

... > Documentation > Menu & Content

MSU Web Template Menu and Content:


Left Menu

Use the left menu when navigation is needed within your site. It can be used with one- or two-column page layouts.

Left Menu Syntax

Unlike with the breadcrumbs, each left menu item is defined on a separate line. Because of this, each $leftmenu[] variable name has to be followed with a set of empty square brackets. Each left menu item can also have two levels of sub-items. The level of the left menu item is specified by the number of stars * (Shift+8). In the example below, "Staff" is a sub-item of "About the Department"
$leftmenu[]='*Technical Communication Home[/techcomm/]';
$leftmenu[]='*About the Department[/techcomm/about/]{category}';
$leftmenu[]='**Staff[/techcomm/about/staff.html]{selected}';
$leftmenu[]='*Contact Us [/techcomm/contact.html]';
The left menu uses the {selected} attribute. This should be applied to the item corresponding to the current page. The {selected} attribute applies CSS styles, and hides the URL link to differentiate the link to the current page from other links in the menu. In the example above we are on the Staff page. The left menu also uses the {category} attribute. This is used for the top level page when the current page selected is a sub-item. In the example above the "About the Department" has the {category} attribute when the "Staff" page is the {selected} page.

Images in Left Column

$leftimage[]='Mavjobs.com logo[/cdc/images/mavjobs-logo.png|http://www.mavjobs.com/]';

Use the left image when you would like an image in the left column under the left menu. This should be right under the $leftmenu[] items. Image description becomes the alt tag and is required. The first URL in the square brackets is the location of the image, the second URL, separated from the first with a pipe, is the link. The link is optional. Maximum image width is 145px.

$contentcolumns=1;
There can be one or two columns for content. One-column layouts are suitable for most of your pages. Two-column layouts ($contentcolumns=2) are best used for "gateway" pages, where most of the content is just links to other pages. In this case it is best to put the links in both columns, to help minimize unnecessary scrolling.

Right Menu

$rightmenutitle='*Page Title[]';
$rightmenu[]='*First Anchor Link []';
The right menu is an optional feature that can be used in addition to the left menu. Unlike the left menu, the right menu should only be used on pages with one-column layouts. The right menu is great for navigation within a page, for long pages.

Right Menu Syntax

Right menu syntax is much like that of the left menu, with some exceptions. In the example below the title of the right menu is "Page Contents". This is optional. If you do have a title you can only have one level of items in the right menu. If you omit the title you may have multiple levels like the left menu.
$rightmenutitle='*Page Contents:[]';
$rightmenu[]='*Anchor link[#link one]';
$rightmenu[]='*Anchor link[#link two]';
$rightmenu[]='*Anchor link[#link three]';
$rightmenu[]='*Anchor link[#link four]';

Immediately following the header we can specify whether the left menu column is needed. The values of $leftmenu[] variables will be automatically inserted within these commands.
<?php place('menucolumn');?>
<?php place('menucolumn-end');?>

Ownership

$owner='Owner of the content[/link/]';
This variable defines the owner of the content. It can be a person's name (MSU employees), a department name, or just an email address. In most cases the most appropriate link will be to a departmental contact page:
$owner='Technical Communication[/english/techcomm/contact.html]';
A simple contact form for your website is available upon request from the MSU Web Team, webteam@mnsu.edu. The next best thing is to link directly to an email address. This can be done in two ways:
$owner='Technical Communication[techcomm@mnsu.edu]'; or
$owner='techcomm@mnsu.edu[techcomm@mnsu.edu]';
The second option is better from the usability perspective, as the user will be prepared for his/her default email client to start

Header Placement

<?php place('header');?>
This should immediately follow the closing tag of the page header. It will insert into your page: the purple MSU header bar, the yellow MSU navigation bar, subhead (if defined), the page title and breadcrumbs. It uses definitions of these variables: $windowtitle, $headertitle, $subhead (optional) and $breadcrumbs.

Content

Note: The highest level heading tag allowed in the content area is h2. H1 is already defined by the $headertitle variable.

Content Placement

<?php place('content');?>
Immediately following the place header command (or the left menu placement command, if present) the beginning of the content is defined:
<?php place('content');?>
<!--CONTENT BELOW-->
Anything between the lines above and the lines below is the content of your page.
<!--CONTENT ABOVE-->
<?php place('content-end');?>

Right Column

<?php place('rightcolumn');?>
<?php place('rightcolumn-end');?>

If you're using the right menu, you must tell the processing file to place the menu. The right menu will not be rendered if these placement commands are missing, even if you defined the right menu items in the header. The right menu is always placed within the content area:
<?php place('content');?>
<!--CONTENT BELOW-->
<?php place('rightcolumn');?>
<?php place('rightcolumn-end');?>
Anything between the lines above and the lines below is the content of your page.
<!--CONTENT ABOVE-->
<?php place('content-end');?>

Starting New Column

<?php place('contentcolumn-add');?>
If you're using a two-column layout, you must mark the end of the first and the beginning of the second column:
<?php place('content');?>
<!--CONTENT BELOW-->
First column content.
<!--CONTENT ABOVE-->
<?php place('contentcolumn-add');?>
<!--CONTENT BELOW-->
Second column content.
<!--CONTENT ABOVE-->
<?php place('content-end');?>

Mixed Column

<?php place('contentcolumn-split-begin');?>
<?php place('contentcolumn-split-separate');?>
<?php place('contentcolumn-split-end');?>

Use the mixed column when you would like to have both one column content and two column content on the same page. The code for a mixed column layout looks like this:

<?php place('content');?>
<!--CONTENT BELOW-->
One column content.
<!--CONTENT ABOVE-->
<?php place('contentcolumn-split-begin');?>
<!--CONTENT BELOW-->
First column content.
<!--CONTENT ABOVE-->
<?php place('contentcolumn-split-separate');?>
<!--CONTENT BELOW-->
Second column content.
<!--CONTENT ABOVE-->
<?php place('contentcolumn-split-end');?>
<!--CONTENT BELOW-->
Return to one column content
<!--CONTENT ABOVE-->
<?php place('content-end');?>

Ending Content

<?php place('content-end');?>
After writing all the contents required for the page this line of code should be inserted to mark the end of the contents.

Footer

<?php place('footer');?>
Immediately following the place content-end command the footer is placed:
<?php place('footer');?>
The footer contains the content owner information, as well as the MSU logo, the MSU utility Links, and page information.