The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

> Update a Nav Bar: Best Solution?
nathanjohns
post May 24 2012, 01:26 PM
Post #1





Group: Members
Posts: 2
Joined: 23-May 12
Member No.: 17,154



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.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
 
Reply to this topicStart new topic
Replies
pandy
post May 24 2012, 03:01 PM
Post #2


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



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.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 18th April 2024 - 01:00 AM