Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ Markup (HTML, XHTML, XML) _ Update a Nav Bar: Best Solution?

Posted by: nathanjohns May 24 2012, 01:26 PM

Hi folks,

Beginning a website right now, I'm only about 6 pages deep into it, but about to begin on a phase that will involve creating 80 more pages, and there will be many more to come thereafter.

My nav bar is coded into each individual page, however I'm thinking ahead and IF in the future I want to add another page to my navbar or something like this I'd have to go back and change every single HTML file... which would be a pain.

Is there a way to create a single 'navbar' file and import it into each of my pages and/or could you think of a more appropriate solution?

I dabbled with the iframe script, but I'm not terribly sophisticated with this one yet and had some troubles (mostly in the way of there being a scroll bar on my iframe, don't want that)

Thanks for the help.

Posted by: pandy May 24 2012, 03:01 PM

Yep. See http://htmlhelp.com/faq/html/design.html#include-file -

SSI and PHP are probably the most common ways. The FAQ touches on SSI and the PHP way is similar in that you put a "special code" where you want the included file to occur.

If you use, or plan to use, PHP for anything else, go with that.

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)