Solved

Include navigation menu html on each page?

Posted on 2014-02-18
5
984 Views
Last Modified: 2014-02-18
It's been a while since I've done anything in web design.

Last I recall, the way to include a navigation menu one each page (so I don't have to update the navigation menu on 30 different html files), was to use PHP and use an include.

Is there an easier way with the latest HTML so that I can test within my browser without running a web server?

If a webserver is needed, what's the best script/code for including a navigation menu in each html page for a website NOT using PHP, and running on an IIS server?
0
Comment
Question by:garryshape
5 Comments
 
LVL 32

Accepted Solution

by:
Big Monty earned 167 total points
Comment Utility
there really is no "best script/code", it's whatever you feel most comfortable with. Since most navigation is just html, css, and maybe a little bit of javascript, whatever server code you use will be irrelevant, as you'll just need to either write out the html yourself or have your server side code build it and then spit out to the screen.

Include files will still be the way to go, There are so many examples out there, just google "html navigation menus" and you'll have hundreds of thousands of results.

If you're looking at running on IIS, you'll want to stick with classic asp or asp .net. Both have their advantages and disadvantages. I would recommend researching both languages and seeing what's best for your project.

If your project fits the scope of it, you may want to look at using some kind of CMS, such as SharePoint, WordPress, or even Drupal.
0
 
LVL 58

Assisted Solution

by:Gary
Gary earned 167 total points
Comment Utility
Not possible.  For the many ways of doing it require a server
For IIS you can enable SSI and then just use
<!--#include file="filetoinclude.html" -->
0
 
LVL 52

Assisted Solution

by:Scott Fell, EE MVE
Scott Fell,  EE MVE earned 166 total points
Comment Utility
For pure html you can create a page of json data and use javascript or jquery to inject the json/jsonp/js object to your nav.

The serverside method has some advantages as far as tighter manipulation.
0
 

Author Closing Comment

by:garryshape
Comment Utility
Ok thanks guys.
It'd be cool if this were a feature in next version of html
0
 
LVL 82

Expert Comment

by:Dave Baldwin
Comment Utility
It has taken over 10 years between versions of HTML and HTML5 is not official yet.  So HTML6 may appear about the year 2025... or later.  I think you'll find that there is no desire to add a feature like that to HTML since it is well supported by server side languages.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now