Solved

Include navigation menu html on each page?

Posted on 2014-02-18
5
1,005 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 33

Accepted Solution

by:
Big Monty earned 167 total points
ID: 39868321
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
ID: 39868324
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
ID: 39868372
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
ID: 39868413
Ok thanks guys.
It'd be cool if this were a feature in next version of html
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 39868631
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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
ebay style="image-orientation: 90deg;" 2 38
Change div area and length 1 26
Best way to minify CSS with out breaking it 7 35
Checkout Page Input Field not aligned 1 23
So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

773 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