Hi! I've begun writing the HTML code for my site, but I've found a problem. I want to make a pretty standard, educational site, with a menu on the left, and the information on the right. Now, I don't want to change the menu on every page of my site when I need to change it. So, that's my problem. The only solution I know of, is the <iframe> tag. Is that the correct one? I have the feeling it's not used a lot around here, and on other websites I haven't seen it used a lot. I don't want to use lots of script, since I have not learned that yet, although a little JavaScript could be done. So, can anyone help me? Would the <iframe> be correct, or is there another way to do this? Thanks a lot!
if you are going to stick with HTML...then you can have the side menu written using Javascript document.write
PHP is a good option, all you have to do is change the calling code position to change the menu position etc although even this isnt advisable. Why would you want to change the site layout? If you create it with CSS then any minor changes means you change the one CSS file and every single file changes with it. Be warned, css is alot different to tbales in html.
Just use dreamweaver and use the template system. It will automaticly create php files that import the menu template.
OK, so I can use CSS to change the style of the menu. But not if I wanted to change the menu itself! So, if I used CSS for the menu, I'd have to edit every page of my site if I wanted to change the menu. Nah! No templates. I want to do everything myself!
It means that you first make a template and use it to your other pages. I didnt mean that you should use an already existing template.
Im afraid theres not much of an option here... you could always use a CMS (content management system) that will automatically add the pages to the menu on every page. Apart from that, no getting away with it. You could try this koivi.com/css-menus.zip
And using Java, like selbourne said? Can't I use a write command to write one external file to all my pages?
you could do it with a client side include. Easiest way I've found to do it is to write it in straight HTML and then convert it to javascript at http://www.moock.org/webdesign/javascript/client-side-include/index.html then place the call to the javascript wherever you want the menu to be. Then when you want to update the menu, you just update the menu file and it's updated site wide. Cons: Google won't see the menu.
Nice find Spring Cypress, is that a tried and tested method yourself? Google not seeing the menu is quite a blow though, manual url list it might have to be
it most definatlly works... I use it fairly often when I'm putting a site together and the menu is constantly changing... But once I have the structure set in stone I go back and take out all the calls to the menu script and replace it with the menu itself so that the search engines grab all the content. Pieter -> Google doesn't see links inside Javascript files... Most SEs don't. (don't know of any which do, but I hate to use the word all)
If your server is running Apache you can use server side includes... http://httpd.apache.org/docs/1.3/howto/ssi.html but that only work for me about half the time...
Mmmm. I was thinking this something else. First, let me explain my site: It's an educational history site. The manu would contain links to the different time periods I discuss. So, I don't want to change every page when I add a new era. I was thinking this: What if I would make a menu with one command 'Eras' and made a 'mouse-over' command which would call upon an external bar with the different eras? Then, I'd only have to change the external bar. Would that work? Or can't I call on an external file with a mouse-over command?
I use PHP and just do a template system that calls the header, body, and footer. So whenever I want to update a navigation link I just edit the appropriate of 3 files and its all changed. Dreamweaver will do this like mentioned above.
PHP!!! Do the page, as you normally would, and then make an include switch statement for the main content side/box. This way you only have to make the simple content pages instead of the full site over and over. Then you can just change the 1 index page to w/eand its applied all over. (google "PHP Navigation" and you will get something)
If you can't use PHP or Server Side Includes, then what about just using frames? Like you mentioned? Have a frame for the side navigation panel. Although frames are eww (or I think) it seems like a viable means of getting the solution you want.
Thanks for all the advice, guys (and gals!). I decided to give it a try with PHP. I'm not there yet, but have one question: If I use a include statement, I read that I should include a PHP file. Can I also use the include statement to include a HTML file? Thanks!