Help Search Campus Map Directories Webmail Home Alumnae Academics Admission Athletics Student Life Offices & Services Library & Technology News & Events About the College Navigation Bar
MHC Home Using the Document Interface

The Navigation Bar

Syntax: .NAVBAR [NavOff] [BannerOff] [BannerTxt=] [BannerImg=] [BannerWid=] [BannerHt=]

Every page on the main server that uses the Document Interface displays a navigation bar. It consists of three elements, which can be changed or removed:

All parameters of the .NAVBAR command are optional:

NavOff

Purpose: Turns the navigation bar off, so that it does not appear on the page.

Example:

<!--.navbar navoff-->

BannerOff

Purpose: Turns the banner and logo off, so that they do not appear on the page.

Example:

<!--.navbar banneroff-->

BannerImg=

Purpose: To use a different image file as the banner. The BannerWid and BannerHt parameters must also be specified, so that the image will have the correct shape. This parameter overrides any default banner your page might otherwise use.

Example:

<!--.navbar bannerimg="new_banner.gif" bannerwid=255 bannerht=30-->

BannerTxt=

Purpose: This option works in two ways. If you are using a BannerImg or there is a default banner, then when your Web page is loaded on a system which either does not load images or has them turned off by default, this alternate text will be displayed instead. It's a good idea to always use alternate text, even if you don't change the banner image itself.

Alternately, if you are not using a graphical banner at all, this text will be used, in an approximation of the MHC blue, serif typeface. If there is a default banner for the page, setting this value will override it.

Examples:

<!--.navbar bannerimg="new_banner.gif" bannerwid=255 bannerht=30 bannertxt="What's New?"-->
<!--.navbar bannertxt="What's New?"-->

BannerWid=

Purpose: If using a BannerImg, you should also define the width and height of the image. Otherwise, the banner will be stretched or compressed by the browser. Unless the .SIMPLEPAGE Wide option is used, your banner should be no more than 434 pixels wide.

Example:

<!--.navbar bannerimg="new_banner.gif" bannerwid=255 bannerht=30-->

BannerHt=

Purpose: If using a BannerImg, you should also define the width and height of the image. Otherwise, the banner will be stretched or compressed by the browser. Your banner should be no more than 65 pixels tall.

Example:

<!--.navbar bannerimg="new_banner.gif" bannerwid=255 bannerht=30-->

----------------------------------------------------------------------

Where Default Banners Come From

The document interface looks for two files to decide what default banner to use on a particular page. The first file is banner.txt. If this file is present in the same folder as a document, or in one of its parent folders, the document will have the banner image it describes by default. This is a good way to add the same banner to a set of pages, without having to use the .BANNER comand on each one.

The format of a banner.txt file is quite simple. Comments begin with #, and anything else is assumed to be the banner description. The banner description must consist of the URL of the graphic file, followed by its width, height, and alternate text to be displayed when the image is not loaded.

For example, this is the banner.txt file that appears at the topmost level of the Web site, /banner.txt:

# Default banner description for this and all child directories.
# Whenever an SHTML file does not specify a banner image with the
# .NAVBAR or .BANNER command, this info gets used.
#
# Format:  ImageLocation Width Height AltText
/grafx/banner_dflt.gif 277 29 Mount Holyoke College

This file tells the document interface to use the image /grafx/banner.gif by default in any page, in any subdirectory. This image's width is 277 pixels, and its height is 29.

The other file that is still supported, though not recommended, is .banner.gif. This file becomes the default banner for the directory it appears in, as well as any subdirectories. It has several drawbacks which make it undesirable, however:

Suffice it to say, it is far easier to use the banner.txt file.

----------------------------------------

Home | Directories | Web Email | Calendar | Campus Map | Search | Help

About the College | Admission | Academics | Student Life | Athletics
Offices & Services | Giving | News & Events | Alumnae | Library & Technology

Copyright © 2004 Mount Holyoke College. This page created by the OIS Operations Group and maintained by Webmaster. Last modified on December 8, 2004.