|
Posted by William Hughes on 11/12/06 05:54
On Sat, 11 Nov 2006 20:08:17 -0800, in alt.html Terry Liittschwager
<terrytoo@wildblue.net> wrote:
>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:
>
> ...
>
>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.
Is it my imagination, or is this question popping up more and more
often of late? Not picking on you, Terry, but this question is asked
in one or another of the html newsgroups on a near-daily basis.
At any rate, your options are:
1. Server-Side Includes, if your ISP enables such. Make your menu a
stand-alone file, then place a line similar to
<!--#include virtual="menufile.htm"-->
where you want your menu to appear.
2. IFRAME. A bit more involved; also uses a stand-alone menu file. See
the source of http://home.grandecom.net/~cvproj/carrier.htm for an
example. Details about IFRAME can be found at
http://www.htmlhelp.com/reference/html40/special/iframe.html
For the record, my site - which I give as the example above - contains
nearly 300 individual pages, all of which use the same menu.
There may be other ways of accomplishing the task, but these are the
two easiest to apply, IMO.
--
William Hughes, San Antonio, Texas: cvproj@grandecom.net
The Carrier Project: http://home.grandecom.net/~cvproj/carrier.htm
Support Project Valour-IT: http://soldiersangels.org/valour/index.html
Navigation:
[Reply to this message]
|