By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,474 Members | 1,343 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,474 IT Pros & Developers. It's quick & easy.

How to keep a fixed menu list?

P: n/a
I've created a navigation menu list with CSS, and it works fine.
However, on every web pages that it appears, I have to add the same
content, e.g.:

<div id="navcontainer">
<ul id="navlist">
<li><a href="index.html" title="Home">Home</a></li>
<li><a href="find.html" title="Find">Find</a></li>
<li><a href="shopping01.html" title="Shopping">Shopping</a></li>
<li><a href="contact.html" title="Contact">Contact</a></li>
<li><a href="base_page.html" title="About">About</a></li>
</ul>
</div>

How do I set this up to store the content in a single location and then
have the web pages refer to it? That way when I make a change to the
list content it is reflected in all pages.

thanks

Nov 6 '06 #1
Share this Question
Share on Google+
9 Replies


P: n/a
On 6 Nov 2006 16:14:09 -0800, in
comp.infosystems.www.authoring.stylesheets "hurricane51"
<bk*****@fastmail.fmwrote:
>I've created a navigation menu list with CSS, and it works fine.
However, on every web pages that it appears, I have to add the same
content, e.g.:

<div id="navcontainer">
<ul id="navlist">
<li><a href="index.html" title="Home">Home</a></li>
<li><a href="find.html" title="Find">Find</a></li>
<li><a href="shopping01.html" title="Shopping">Shopping</a></li>
<li><a href="contact.html" title="Contact">Contact</a></li>
<li><a href="base_page.html" title="About">About</a></li>
</ul>
</div>

How do I set this up to store the content in a single location and then
have the web pages refer to it? That way when I make a change to the
list content it is reflected in all pages.

thanks
1. Server Side Includes: must be enabled on your ISP's server.

<!--#include virtual="menu.htm"-->

2. Inline frame (IFRAME): Works anywhere... mostly.

<IFRAME SRC="!menu.htm" name="menu" height=2590 align=left
scrolling="no" marginwidth=0 marginheight=0><!-- Alternate content for
non-supporting browsers --><a href="!fullmenu.htm">Click here for
menu</a></IFRAME>

I use IFRAME since GrandeCom does not enable SSI.

--
Support Project Valour-IT: http://soldiersangels.org/valour/index.html
Nov 7 '06 #2

P: n/a

William Hughes wrote:
On 6 Nov 2006 16:14:09 -0800, in
comp.infosystems.www.authoring.stylesheets "hurricane51"
<bk*****@fastmail.fmwrote:
I've created a navigation menu list with CSS, and it works fine.
However, on every web pages that it appears, I have to add the same
content, e.g.:

<div id="navcontainer">
<ul id="navlist">
<li><a href="index.html" title="Home">Home</a></li>
<li><a href="find.html" title="Find">Find</a></li>
<li><a href="shopping01.html" title="Shopping">Shopping</a></li>
<li><a href="contact.html" title="Contact">Contact</a></li>
<li><a href="base_page.html" title="About">About</a></li>
</ul>
</div>

How do I set this up to store the content in a single location and then
have the web pages refer to it? That way when I make a change to the
list content it is reflected in all pages.

thanks

1. Server Side Includes: must be enabled on your ISP's server.

<!--#include virtual="menu.htm"-->

2. Inline frame (IFRAME): Works anywhere... mostly.

<IFRAME SRC="!menu.htm" name="menu" height=2590 align=left
scrolling="no" marginwidth=0 marginheight=0><!-- Alternate content for
non-supporting browsers --><a href="!fullmenu.htm">Click here for
menu</a></IFRAME>

I use IFRAME since GrandeCom does not enable SSI.

--
Support Project Valour-IT: http://soldiersangels.org/valour/index.html
My ISP supports SSI, but it appears that I need to rename all of my web
pages .shtml to use this feature?

I created a SSI_navmenu.shtml file (also tried with the .html
extension). Here's the entire contents:

<ul id="navlist">
<li><a href="index.shtml" title="Home">Home</a></li>
<li><a href="find.shtml" title="Find">Find</a></li>
<li><a href="shopping01.shtml" title="Shopping">Shopping</a></li>
<li><a href="contact.shtml" title="Contact">Contact</a></li>
<li><a href="base_page.shtml" title="About">About</a></li>
</ul>

Here's what I inserted into my test web page:

<div id="navcontainer">
<!--#include virtual="SSI_navmenu.shtml-->
</div>

The page comes up with an "error processing this directive" and
displays none of the content (for the include or otherwise).

Nov 7 '06 #3

P: n/a
On 6 Nov 2006 18:10:25 -0800, "hurricane51" <bk*****@fastmail.fmwrote:
Here's what I inserted into my test web page:

<div id="navcontainer">
<!--#include virtual="SSI_navmenu.shtml-->
</div>

The page comes up with an "error processing this directive" and
displays none of the content (for the include or otherwise).
Missing double quote at end ?

--
Steven
Nov 7 '06 #4

P: n/a

Steven Saunderson wrote:
On 6 Nov 2006 18:10:25 -0800, "hurricane51" <bk*****@fastmail.fmwrote:
Here's what I inserted into my test web page:

<div id="navcontainer">
<!--#include virtual="SSI_navmenu.shtml-->
</div>

The page comes up with an "error processing this directive" and
displays none of the content (for the include or otherwise).

Missing double quote at end ?

--
Steven
Steven,

OK, that was an error in the message, not in the page.

Here's the cut-and-pasted line:

<!--#include virtual="SSI_navmenu.shtml"-->

I simplified the SSI_navmenu.shtml file to a single line of text:

Home

But it still does not display.

Nov 7 '06 #5

P: n/a

Steven Saunderson wrote:
On 6 Nov 2006 18:10:25 -0800, "hurricane51" <bk*****@fastmail.fmwrote:
Here's what I inserted into my test web page:

<div id="navcontainer">
<!--#include virtual="SSI_navmenu.shtml-->
</div>

The page comes up with an "error processing this directive" and
displays none of the content (for the include or otherwise).

Missing double quote at end ?

--
Steven
OK, I did something that made it work. Let me work backwards to find
out what it was(!).

Thanks for the help!

Nov 7 '06 #6

P: n/a
On 6 Nov 2006 18:10:25 -0800, in
comp.infosystems.www.authoring.stylesheets "hurricane51"
<bk*****@fastmail.fmwrote:
>My ISP supports SSI, but it appears that I need to rename all of my web
pages .shtml to use this feature?
Shouldn't have to. My previous ISP had SSI, and ".htm" worked just
fine.
>I created a SSI_navmenu.shtml file (also tried with the .html
extension). Here's the entire contents:

<ul id="navlist">
<li><a href="index.shtml" title="Home">Home</a></li>
<li><a href="find.shtml" title="Find">Find</a></li>
<li><a href="shopping01.shtml" title="Shopping">Shopping</a></li>
<li><a href="contact.shtml" title="Contact">Contact</a></li>
<li><a href="base_page.shtml" title="About">About</a></li>
</ul>

Here's what I inserted into my test web page:

<div id="navcontainer">
<!--#include virtual="SSI_navmenu.shtml-->
</div>

The page comes up with an "error processing this directive" and
displays none of the content (for the include or otherwise).
That usually means that SSI is not enabled. You might want to
doublecheck with your ISP tech support.

Trick question: are your page and your file to be included in the same
directory?

Just for grins, lose the div pair around your include statement and
see what happens.

Oh... you are making sure that you are loading live and not from
cache, yes?

If you want to take a swing at the inline frame option, try this:

<IFRAME SRC="SSI_navmenu.shtml" name="menu" height=250 align=left
scrolling="no" marginwidth=0 marginheight=0><!-- Alternate content for
non-supporting browsers --><a href="SSI_navmenu.shtml">Click here for
menu</a></IFRAME>

--
Support Project Valour-IT: http://soldiersangels.org/valour/index.html
Nov 7 '06 #7

P: n/a
On 6 Nov 2006 20:52:12 -0800, "hurricane51" <bk*****@fastmail.fmwrote:
OK, I did something that made it work. Let me work backwards to find
out what it was(!).
Can you try putting a space after the closing quote :

<!--#include virtual="SSI_navmenu.shtml" -->

Or try file instead of virtual :

<!--#include file="SSI_navmenu.shtml" -->

--
Steven
Nov 7 '06 #8

P: n/a
On Mon, 06 Nov 2006 23:05:38 -0600, William Hughes
<cv****@grandecom.netwrote:
Trick question: are your page and your file to be included in the same
directory?
William, can you clarify something for me please ?

I believe that #include virtual is limited to the current domain file
space whereas #include file is not. So #include virtual="/file.htm"
will look in the root directory for the domain but #include
file="/file.htm" will look in the server root directory. Is this
correct ?

--
Steven
Nov 7 '06 #9

P: n/a
On Tue, 07 Nov 2006 16:27:21 +1100, in
comp.infosystems.www.authoring.stylesheets Steven Saunderson
<ph****@Syd.auwrote:
>On Mon, 06 Nov 2006 23:05:38 -0600, William Hughes
<cv****@grandecom.netwrote:
>Trick question: are your page and your file to be included in the same
directory?

William, can you clarify something for me please ?

I believe that #include virtual is limited to the current domain file
space whereas #include file is not. So #include virtual="/file.htm"
will look in the root directory for the domain but #include
file="/file.htm" will look in the server root directory. Is this
correct ?
Hmm... you may have just taken a step past the limits of my knowledge,
but I do believe that you are correct. I wish that who ever came up
with this would have used more descriptive names: "include relative"
and "include absolute", frex.

At any rate, accessing the server root directory in this manner may
run into problems with permissions; I wouldn't recommend trying it
without coordinating with the ISP system administrator.

--
Support Project Valour-IT: http://soldiersangels.org/valour/index.html
Nov 7 '06 #10

This discussion thread is closed

Replies have been disabled for this discussion.