|
Posted by carolyn on 11/12/06 10:34
Terry Liittschwager wrote:
> For the past several years, my wife and some other ladies have had a
> little
> charity that provides comfort quilts to "at risk" children. Increasingly
> she has been getting asked if they had a website, so I decided to set one
> up for her. The website, comfortsforchildren.org is very amateurish thus
> far since I have no expertise in this area, but I'm learning - slowly,
> though, 67 year-old retired brains don't learn fast.
>
> Anyway, my current very basic question concerns the navigation bar on the
> upper left of each page. It's the same for each page, works fine, and is
> currently implemented with the following lines in each page:
>
> <div class="navbar">
> <p><a href="index.html">Home</a></p>
> <p><a href="policies.html">Policies</a></p>
> <p><a href="agencies.html">Agencies<br />Served</a></p>
> <p><a href="statistics.html">Statistics</a></p>
> <p><a href="construct.html">Quilt<br>Construction</a></p>
> <p><a href="testimonials.html">Testimonials</a></p>
> <p><a href="history.html">History</a></p>
> </div>
>
> The problem is that whenever I want to add another line, I have to edit
> every page. I'm sure there must be some way to have those lines in a
> separate file, referenced by one line unchanging line in each page, so
> that
> when I change the navbar, I only have to do it in the one place. For the
> life of me, though, I haven't found out how to do that.
>
> I've tried using <link href="navbar.html" /> with navbar.html a file with
> those lines, but all that happens is that the navbar disappears.
>
> I've also tried @import, but it appears that only works within a style
> definition.
>
> So, could someone point me in the right direction?
>
> Any and all suggestions will be most welcome.
>
> Terry L
I think the simplest thing to do, if your server supports it, is server side
includes. No PHP to learn - you can learn it later if you want to. No
frames. All you need to do is...
1. Cut and paste the menu lines <div class="navbar"> ... </div> into a file
such as menu.html
2. Insert a line <!--#include virtual="menu.html"--> into each file where
the menu is to appear.
3. Rename each content file index.shtml, policies.shtml, and so forth.
The *.shtml instructs your server, if configured for it, to parse the file
for SSI (Server Side Includes) instructions such as the #include. In this
particular case it would insert the content of menu.html into the file at
that location of the code. It then streams the entire 'virtual' page to
the end user.
Carolyn
--
Carolyn Marenger
Navigation:
[Reply to this message]
|