Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1063
  • Last Modified:

Include navigation menu html on each page?

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
garryshape
Asked:
garryshape
3 Solutions
 
Big MontySenior Web Developer / CEO of ExchangeTree.org Commented:
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
 
GaryCommented:
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
 
Scott Fell, EE MVEDeveloperCommented:
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
 
garryshapeAuthor Commented:
Ok thanks guys.
It'd be cool if this were a feature in next version of html
0
 
Dave BaldwinFixer of ProblemsCommented:
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now