The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> 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
pandy
post May 24 2012, 03:01 PM
Post #2


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 15,675
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.


--------------------
"Never go to excess, but let moderation be your guide."
- Cicero

IPB Image
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

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 December 2014 - 12:22 PM