Update a Nav Bar: Best Solution? |
Update a Nav Bar: Best Solution? |
nathanjohns |
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. |
pandy |
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. |
Lo-Fi Version | Time is now: 18th April 2024 - 01:00 AM |