Welcome to WebmasterWorld Guest from 184.72.177.182

Forum Moderators: incrediBILL

Message Too Old, No Replies

When I add a new page I have to change the menu on all pages

     
4:18 pm on Dec 10, 2004 (gmt 0)

New User

10+ Year Member

joined:Dec 10, 2004
posts:5
votes: 0


I'm pretty new to web desiging. When I add a new page to my website I have to go into every page and add the new page to the menu bar. I know there is a way around this. Can someone please help?
Thanks,
Jen
4:41 pm on Dec 10, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member kaled is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 2, 2003
posts:3710
votes: 0


You need to place your menu bar either in an iframe or use server-side includes (SSI). Depending on site/menu design, iframes may not be suitable.

SSI is implemented by placing a special comment in the html. The server scans the page and inserts the required data (in your case, another file) each time the page is requested.

Typically SSI is enabled by using the filename extension .shtml however changing the file name may cause problems with search engines and backlinks. It can be enabled by editing the .htaccess file but that's another story.

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

In the example above, menu.htm should be simply an html fragment (no <body> or <head> tags, etc.)

Kaled.

4:44 pm on Dec 10, 2004 (gmt 0)

Junior Member

10+ Year Member

joined:Feb 5, 2003
posts:82
votes: 0



Another option (depending on how you build your sites) is to create a master template(s) that automatically updates the pages in your site when you change it. Most wysiwyg programs offer this feature.
5:08 pm on Dec 10, 2004 (gmt 0)

Preferred Member

10+ Year Member

joined:Aug 28, 2002
posts:564
votes: 0


You don't have to link to every page from every other page on your website. Instead, link from every page to a page called Articles (or whatever) and link to all your content pages from there.
4:04 am on Dec 11, 2004 (gmt 0)

Junior Member

10+ Year Member

joined:Nov 10, 2004
posts:171
votes: 0


There's yet another way to do this without SSI... although it follows along the same line as SSI.

Create a text file that contains the javascript to generate the HTML code for the menu. Call the javascript from some location on your web page... whereever it is you want the menu to print.

I once purchased some html templates from a company named allwebco and they did all their menus that way. It was very quick and convienient to make menu changes in one place and have all the pages updated. ...not to mention I didn't have to set up SSI.

Now that I know how to use SSI, I stopped using the java method. If your hosting provider does not do SSI you might consider the java alternative.

Let me know if you need examples.

5:40 am on Dec 11, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:May 26, 2000
posts:37301
votes: 0


Just a note (picky but possibly important for some readers) that Javascript and Java are two very different technologies. Especially if you are researching on a search engine, be sure to keep the difference clearly in mind so you get the results you are after.

This is definitely a Javascript (created by Netscape) method. Java (created by Sun) is rarely used these days in HTML pages, but it is quite valuable on the server side because it allows you to work with data on different platforms.

12:47 am on Dec 13, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 18, 2003
posts:921
votes: 0


Working with templates works best for me. Change the template once, have all your pages update. Works well with dreamweaver, frontpage, others.
1:01 am on Dec 13, 2004 (gmt 0)

New User

10+ Year Member

joined:Dec 10, 2004
posts:5
votes: 0


Thanks everyone!
I used SSI.
Wow! Easier then I thought!
Thanks again!
Jen
7:15 pm on Dec 25, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:July 3, 2002
posts:18903
votes: 0


SSI is quite easy to do. PHP also offers a similar functionality, but with lots more power in building dynamic content.

A note about the Javascript menu posted above: beware that those links will not be followed by search engines (and won't work for people that have turned javascript off)), so you'll need to link every page to a sitemap page where you list everything as normal links too.

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members