SiteBuilder 2 Banner

Subdirectories

Description

The content of your site will logically fall into several categories, and these represent the titles of your subpages. Sometimes several of these pages will cluster together under an overarching supercategory, creating a hierarchy. For example, the page you are viewing now is in the category Tutorial along with other subpages that fall under the Tutorial category. Other pages, however are not in this category, like Contact Info.

In the file system of your site, this structure is created with directories inside the main site directory. Each supercategory link points to a subdirectory (and hence it's index.html file). The links under that category represent subpages in the subdirectory.

A subdirectory acts like a mini-site. Each subdirectory will have its own index.html, main.html, and localnav.html as well as several subpages to represent the content in that category.

Templates for these files are available in the yoursite/subdrectory/ folder of the template sets. To create a new category, duplicate the template subdirectory and rename it. The same rules apply as for file names: no spaces or special characters. Keep 'em short.

For index.html, follow the same directions as for the top-level index.html. (Includes changing the title and adding keywords and description META tags)

For main.html and your subpages, follow the same directions as for the top-level main.html and the same directions as for the top-level subpages.

The localnav.html for subdirectories is a little trickier to develop. Ideally, this version of localnav.html should look just like the top-level localnav.html, except that a new, expanded set of links appears under the link for the subdirectory. Be aware that the link URL is different from a subdirectory to a top-level file. For example, if the top-level link is "contact.html," then the link from one subdirectory down would be "../contact.html" If you set your links using Dreamweaver, you have a good chance of getting the link right. Be sure to test your links in your browser.

For links that point within the subdirectory, create the links as you would for the top-level localnav.html -- target points to "main" and the link refers directly to the page. Examples of these links appear in the yoursite/subdirectory/localnav.html of the template set. Notice that these links are indented by using a transparent spacer graphic and use a different (black instead of red) arrow image. The indentations and different colors indicate the hierarchy of the site to your users.

Be sure to save all files (index.html, main.html, localnav.html and any subpages) in the subdirectory, and to test in your browser.

FrameMaster

To ensure that any page can be opened within an appropriate frames setting with the proper localnav.html, we have developed a "FrameMaster" link format to automatically load the right localnav.html with the content page. For example:

To view a page, such as http://www-med.stanford.edu/sitebuilder/yoursite/subpage.html within the proper frames, add "/fm3/?/" just after "www.med.stanford.edu" and "&" just in front of the page's file name. Here's how the above page URL would look:
http://www-med.stanford.edu/fm3/?/sitebuilder/yoursite/&subpage.html
If using as a link, don't forget to set the target to _top

FrameMaster is a handy way to tell people how to view a specific page in your site without tedious instructions to go here, click there and so on. You can also use it when you link back to higher-level pages from a subdirectory, if your site is hosted on Luge.

Note: FrameMaster only works with the "true" URL of a page on Luge, i.e." www-med.stanford.edu/pathto/yoursite/", not with custom domains, i.e. "yourdomain.stanford.edu."

For more information on FrameMaster, visit http://irt.stanford.edu/web/resources/framemaster.html

<--Previous | <--Introduction | Home
JavaScript Pop-up IconPrinter-friendly page HomeHome Icon

This document was last modified: Wednesday, 10-Dec-2003 16:44:26 PST
Copyright © 2003, Stanford University School of Medicine. All rights reserved.