shortcut to content
Minnesota State University, Mankato
Minnesota State University, Mankato

Latest information about COVID-19 and the campus community

×

SiteMaster

Page address: https://web.mnsu.edu/its/web/editing/template/documentation/sitemaster.html

master.php File Example

The following is an example of the master.php file:

<?php
$windowtitlesuffix=' &ndash; Customer Support Help Desk &ndash; ITS ';
$subhead='static';
$subheadbg='';
$subheadimage='ITS[/its/images/webdev-subhead.png]';
$subheadobject='';
$metakeywords='noun,verb';
$metadescription='Things about words, and stuff.';
$metaauthor='firstname.lastname@mnsu.edu';
$breadcrumbprefix='ITS[/its/]^';
$owner='Jeffrey Hundstad[/its/contact.html]';
$pageinfo[]='*ITS Home[/its/]^^^';
$pageinfo[]='*Customer Support[/its/support/]^Customer Support^Customer Support^Customer Support';
$pageinfo[]='**Orientation[/its/support/orient.html]^Orientation^Orientation^Orientation';
$pageinfo[]='***Help Desk[/its/support/servicedesk/]^Customer Support Help Desk^Customer Support Help Desk^Help Desk';
?>

 

Style Option

<?php $styleoption='v2-t2'; ?>

Styleoption specifies that the site uses the new landing page template.

This code should be placed at the top of an HTML page that you would like to have for a home/landing page to your site. It should be placed between <?php setup('header'); ?> and <?php place('header'); ?>. This links the page to a different set of style options than a normal page would, and should only be used for landing/homepage sites.

 

Window Title Suffix

$windowtitlesuffix=' &ndash; Title of Website ';

A page-specific and descriptive title is very useful for the visitors of your web page and critical for search engine indexing. Every master.php needs a $windowtitlesuffix. This is displayed at the top of the browser window.

Browser Window Title

Because of its placement $windowtitlesuffix is rarely read by the visitors, but most search engines rely on it heavily for indexing. $windowtitlesuffix is meant to be the full title of your page, e.g., "Information and Technology Services – Minnesota State University, Mankato". All you need to add is the window title of the homepage of your site. Every page that is clicked after the homepage will automatically be added to the window title. This is explained more when you get to the Page Info section. The title should always have a &ndash; at the beginning.

"Minnesota State University, Mankato" is automatically added to the window title of each page.

 

Graphical Banner Information

Graphical Banner

$subhead=' type ';

This variable specifies the type of graphical banner for the site. The graphical banner can be 'static', 'rotating', or 'custom'.

If graphical banner is set to $subhead='static';, the graphical banner will display one picture that will not rotate upon page refresh. This is is standard subhead type.

If graphical banner is set to $subhead='rotating';, please change it to "custom". The "rotating" option was meant for internal use and is not compatible with the new template look.

Set graphical banner to $subhead='custom'; in order to use an image with a tiled background.

Graphical Banner Image

$subheadimage='Description of image[ path to image ]';

subheadimage specifies the image to be used as the graphical banner. If the graphical banner type is set to 'rotating', the path should lead to a folder containing all the images to be used in the graphical banner. The graphical banner image should be 105px tall and 1000px wide.

Website Meta Information

  • $metakeywords='noun,verb'; are comma separated words pertinent to the site.
  • $metadescription='Things about words, and stuff.'; is a very short sentence describing the site.
  • $metaauthor='firstname.lastname@mnsu.edu'; is the email address of the author.

Breadcrumb Prefix

$breadcrumbprefix='Breadcrumb[/link/]^';

Breadcrumbs provide a logical trail which gives visitors an idea of where they are within the MSU website. Breadcrumb links can be used to navigate "up" to parent categories of a web page. Breadcrumbs are especially helpful for visitors who entered an MSU web page from a direct link (search engine or other) without navigating "down" through the MSU website structure. For example, $breadcrumbprefix='ITS[/its/]^'; tells visitors they are on the ITS page. All you need to add to the $breadcrumbprefix is the home page of your website. When a user navigates to another page in the website that is not the homepage the breadcrumb will be added automatically. This is discussed more in the Page Info section.

MNSU[http://www.mnsu.edu/]^ is automatically added to the breadcrumbs.

Breadcrumb Prefix Syntax

The breadcrumbs use University Web Template syntax. The first part of a breadcrumb is the title. In the example above the titles of the breadcrumbs is ITS. The title is the only part that will actually be visible when the page is generated. The part denoted by square brackets [ ] contains the URL of the breadcrumb item. Breadcrumb items are separated by a caret ^ (Shift+6 on your keyboard). The links are required for all items in the breadcrumb trail.

Breadcrumb Code

$breadcrumbprefix='ITS[/its/]^';
$breadcrumbprefix='Breadcrumb[/link/]^';

 

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, webdevelopment@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

 

Page Info

$pageinfo[]='*Left Navigation Title[/link/]'^Window Title^Header Title^Breadcrumb;

The Page Info line consists of the left hand navigation item, window title, header title and breadcrumbs.

Page Info Syntax

Each $pageinfo[] item is defined on a separate line. Because of this, each $pageinfo[] variable name has to be followed with a set of empty square brackets. Each page info 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"
$pageinfo[]='*Technical Communications Home[/techcomm/]'^Technical Communications^Technical Communications^Technical Communications;
$pageinfo[]='*About the Department[/techcomm/about/]^^^';
$pageinfo[]='**Staff[/techcomm/about/staff.html]^^^';
$pageinfo[]='*Contact Us [/techcomm/contact.html]^^^';

In between the three carets ^^^ (Shift+6) is where you would insert text for the window title, header title and breadcrumbs if you would like them to be different than the wording you used for left hand navigation. In the example above the header title, window title, and breadcrumbs would all display the words "Technical Communications" instead of "Technical Communications Home"

If you do not want your page to display in the left hand navigation you can add {hidden} before the first caret ^. Every page needs a $pageinfo[] line, but not every page has to appear in the left navigation.

$pageinfo[]='*Contact Us [/techcomm/contact.html]{hidden}^^^';

Window Title

To change what will be displayed as the window title of a page place alternative text after the first caret ^. If you don't add any text after the first caret ^ the default text will be what you put for $pageinfo[].

Header Title

The header title (text you place after the second caret ^) is inserted directly into the page as an <h1> XHTML tag. It is visible to web page visitors and, like the window title, important for search engines. It should be the actual title of the page, e.g., "Technical Communication Program". If you don't add any text after the second caret ^ the default text will be what you put for $pageinfo[].

Be sure to verify that the header title fits in the space provided. Sometimes when you let the $pageinfo[] text default as the header text it might not fit. If this happens you will need to specify alternative text that is shorter. The space is limited in pixels.

Breadcrumbs Title

To change what will be displayed as the breadcrumb place alternative text after the third caret ^. If you don't add any text after the third caret ^ the default text will be what you put for $pageinfo[]. As with the header title, make sure the text you specified for the breadcrumb trail fits in the space provided.

Hidden

If you would like a page not to display in the left navigation you can use {hidden}. Example below:

$pageinfo[]='**Staff[/techcomm/about/staff.html]{hidden}^^^';