Drop Shadow

Creating site.list files

The best way to manage your navigation menus is to use appropriate file names. Your filename should be what you want the menu to be, with spaces replaced by underscores. Besides making it easier—you won’t have to deal with site.list files—this will also assist search engines in ranking your site.

Filename conventions

  • File extensions (such as .php) are removed.
  • Underscores are converted to spaces.
  • The first letter and any letter following a space are capitalized.
  • Any filenames that are four characters or less are displayed in all-caps.
  • Any occurrence of “Usd ” are converted to “USD ”.

If you follow those conventions when naming files, you shouldn’t need to use a site.list file.

Overriding the file system

By default, every file except for a few special files will be displayed in your navigation menu. If you only want some files to display, you can create a file in the folder called “site.list”. On each line, place the name of the file you want. Only the listed files will be displayed, and they will be displayed in that order.

  • Never refer to index.php in these files.
  • If you use ampersands in the file, that are not part of an entity, make sure you type them as &.
  • The site.list or site.modify file needs to be in the folder that it’s overriding.

Adding new items

If you want additional items in the menu besides the items in the file systems, you can create a “site.modify” file in the folder. These files use the same syntax as site.list, but do not override the file system; they modify existing items, or add new items to the menu.

You can use a site.modify file if you don’t want to have to fully manage every file, but only want to change a file or add an outside-of-folder link.

Advanced site.list files

Use different text
If, after the filename, you add a tab and then some more text, that text will be used as the file’s text in the menu.
Offsite links
If, instead of a filename, you put a full URL on a line in the file, that URL will be linked to. The URL must contain a colon; any “filename” that contains a colon is assumed to be a URL. Note that some sites at USD will have special rules for offsite links; they do this by overriding makeNavigationLink in their Navigator subclass or by setting offsitePopups to “true” in their Navigator subclass.
Cross linking
You can also provide the full URL path to another site on the USD server. Any filename in the file that begins with a slash is assumed to be a local crosslink. Subsites can treat these “onsite” crosslinks differently by overriding makeNavigationLink in their Navigator subclass.
Special styles
You can create multiple sections in the menu by adding a new style. Any line that starts with the dollar sign ($) is assumed to be a new style. The menu list will be closed, and a new list will be started using that style class.
In-page linking
If you need to add target links to the current page, first, make sure that the page shouldn’t just be broken into more targeted subpages. However, if you need to link within the page, start the target’s name with “./#”.
Comments
You can put comments in your file by starting them with a hash symbol. Any line starting with “#” is ignored.

Sample

This is a sample that uses all features; you wouldn’t likely use something this complex.

#site.list file to remove management links from menu academics registration.php $restaurants http://bakery.example.com/ Milagro Bakery http://chili.example.com/ Ice Cream Screamery /dining/alcala/ The Alcala Café $requirements ./#credits Credits ./#paperwork Paperwork ./#deadlines Deadlines

In the first section of this example, “academics” is probably a folder and “registration.php” a PHP page. They will be displayed in the menu as “Academics” and as “Registration”.

Then, there’s a restaurant section with two off-site links and one onsite crosslink. It will be in its own HTML list with the class “restaurants”.

Finally, there is a requirements section, with three in-page links. It will be in its own HTML list with the class “requirements”.