[thelist] SSI for navigation
Garrett Coakley
garrett at polytechnic.co.uk
Wed Jul 12 13:23:21 CDT 2000
> Do y'all use SSI for stuff like navigation that is common over many
> pages? I just read about it, am very excited, but before making the
> leap I thought I would check with the experts. Is this one way to
> avoid framed navigation if you have lots of pages?
Martha,
This is one of the (many) things that SSI is perfect for. On
www.spiked.co.uk the left hand navigation is just one file that is
pulled in via an include. Also, if you look at the source, the meta
tags, and the copyright info are SSI as well.
I've also found a nifty way of doing navigation using SSI in
conjunction with CSS (well, I say "I've found", but I'm sure I'm not
the first).
A site that I'm currently building has the navigation stored in an
SSI file, with each of the links given an ID. My stylesheet has the
default formatting for links defined in it, but then in the HEAD of
each page I have a STYLE block which redefines the link for that page
only. This overrides the formatting for that link on that page giving
the user a key to which page they're on.
For example:
The SSI file contains the following:
<a href="foo.html" id="fooLink">Foo</a>
<a href="bar.html" id="barLink">Bar</a>
In the CSS file I have this:
a:link {color : #FFFFFF ; background-color : #000000 ; }
And in the head of foo.html I have the following STYLE block:
<style>
<!--
#fooLink {color : #000000 ; background-color : #FFFFFF ; }
-->
</style>
Which changes the link formatting, without having to touch the SSI.
So far it seems to be working like a charm. Next on my list of things
to get my head round is XSSI
G.
---------------------------------------------------------------------
"Hyperlinks subvert hierarchy" - Cluetrain 95 Theses - #7
http://www.cluetrain.com
More information about the thelist
mailing list