03.07.99

'For Placement Only'

Posted in General at 5 pm

I just spent the past 6 hours re-doing my s.u.r.f.a.c.e site. I don’t really know why I I did it, because the time could have been better spent sleeping or cleaning or something, but I got an idea in my head this… er… yesterday afternoon, and wanted to run with it.

I had been moving my site towards using XSSI commands, particularly for including chunks of HTML that I didn’t want to code into each individual page. It’s a bear to update, and that’s one of the reasons why the navigation on the surface had always been so minimal, and even difficult.

The first step towards getting things ready was moving all of the pages from having the filename.html to filename.shtml. This may seem trivial, but there are a few ‘gotchas’ that you have to watch out for.

Only thing that did aid me was the fact that I _never_ refer to the file index.html. This may sound strange, but I have everything point to instead is just directory by itself.

This is from the documentation that I developed for OMSI:

A note about ‘home.html’: home.html is a the default file in a directory.

If the site is built properly, you should never have a URL that points directly to one of these default files. The URLs should always point to the sub-directory, not the default file in the sub-directory. Here’s a table of the wrong and right ways of referring to a directory:

The front page (absolute)

   Right: “http://www.omsi.edu/”
   Wrong: “http://www.omsi.edu/home.html”

The front page (relative)

   Right: “/”
   Wrong: “/home.html”

The main page in the current directory

   Right: “./”
   Wrong: “home.html”

The main page in the parent directory

   Right: “../”
   Wrong: “../home.html”

The main page in a sub-directory

   Right: “foobar/”
   Wrong: “foobar/home.html”

Anchor inside a page:

   Right: “/foobar/#hours”
   Wrong: “/foobar/home.html#hours”

These referals are usually only inside <A HREF=””> tags. This is also important to know for when the Marketing Dept. asks you for the URL for an event or a page. Don’t include the default file’s name. Just point to the directory. (“/events/astronomyshow/home.html” vs. “/events/astronomyshow/”)

Since I use a _lot_ of sub-directories in my site, a lot of file references didn’t have to change. Of course, a simple multi-file search and replace ended up doing most of the rest of the work, but I still felt good for thinking ahead on this front.

Comments and feedback on the new layout is appreciated. More graphics will end up taking the place of the pieces of text that are there, but I am planning on renaming the site ‘For Placement Only’. I may integrate the layout and design into Dwelling as well.

RSS feed for comments on this post · TrackBack URL

Leave a Comment