473,395 Members | 1,581 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Maintaining navigation

I'm currently developing a medium-sized site (looks like there could be 50-60 pages) and have been going ok. However, the design is evolving a little as I go. As the number of pages grows, I'm beginning to find that making content changes to universal elements (like navigation) is becoming a real burden.

Is there any way to specify content once and include it in each page by reference, the way that styles & layout are?
Nov 16 '06 #1
7 1308
steven
143 100+
Are you using anything like PHP for the website code? If so, you can include files or even use a templating parser and include the files.

For example, I've created my own template parser and one of it's functionalities allows me to include files. So each page has say navigation.html, header.html and footer.html included, so that if I ever need to make any changes, I only need to edit one file.
Nov 16 '06 #2
AricC
1,892 Expert 1GB
Yeah what he ^ said make one file called menu.htm then just include it in all of your pages via php like so:

Expand|Select|Wrap|Line Numbers
  1. <?php include('menu.htm') ?>
or
Expand|Select|Wrap|Line Numbers
  1. <!--#include virtual="menu.htm" -->
Nov 16 '06 #3
Are you using anything like PHP for the website code? If so, you can include files or even use a templating parser and include the files.

For example, I've created my own template parser and one of it's functionalities allows me to include files. So each page has say navigation.html, header.html and footer.html included, so that if I ever need to make any changes, I only need to edit one file.
I haven't used anything other than html and css to date, and am only learning those as I go with the help of online tutorials and people like you :-)

It does sound like exactly the sort of solution I'm looking for. Would you say that teaching myself enough PHP to do what you've suggested would be any harder than learning html & css?
Nov 16 '06 #4
Yeah what he ^ said make one file called menu.htm then just include it in all of your pages via php like so:

Expand|Select|Wrap|Line Numbers
  1. <?php include('menu.htm') ?>
or
Expand|Select|Wrap|Line Numbers
  1. <!--#include virtual="menu.htm" -->
Do you generally find any cross-browser issues with this sort of code?
Nov 16 '06 #5
AricC
1,892 Expert 1GB
No you shouldn't run into cross browser issues, and yes it is relatively easy to learn. Make sure the place you hosting the site with supports PHP if you want to use the php include also there isn't much of a learning curve if you simply want to use it to include files.
Nov 17 '06 #6
Great, thanks for that. I'll give it a try.
Nov 19 '06 #7
ronverdonk
4,258 Expert 4TB
If you are going to use PHP (very sensible), have a look at the following links for absolute PHP beginners:

http://www.allsyntax.com/tutorials/P...Tutorial/1.php
http://www.w3schools.com/php/default.asp
http://devzone.zend.com/node/view/id/627

Ronald :cool:
Nov 19 '06 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: lost hope | last post by:
hey guys, on the main page of my site, i have a login area (user/pass text boxes). when the user submits the form, the page is reloaded with with a global php variable "loggedIn" set to true. i...
0
by: Veli-Pekka Tätilä | last post by:
Hi, My first post here. I've found some serious accessibility flaws in the Python 2.4 docs and wish they could be rectified over time. I'm very new to Python and initially contacted docs at python...
1
by: Robert Neville | last post by:
I am having some trouble with some old code revolving around custom form navigation buttons. My main form has a sub-form with these custom navigation buttons. In other words, the code should be...
0
by: Jesper Lauridsen | last post by:
I am developing an ASP.NET application for a Questionnaire that spans over several pages. The entire Questionnaire code resides in one ASPX page. When a user submits a questionnaire page by...
6
by: Mike | last post by:
I have a few textbox controls that have autopostback so that when they loose focus they update a label control that shows the count of characters in their respective text control. This works fine,...
4
by: Sandy.Pittendrigh | last post by:
I don't want to get into a frames discussion here. We all know they have numerous drawbacks, especially with search engine visibility. (Google, ironically, uses framesets for displaying individual...
3
by: Paul | last post by:
I want the <div id="navigation"column to be the same color all the way to the bottom. The "background-image: url(bg_menu_tile.gif);" was a try to force it with a long 1-pixel graphic - didn't...
10
by: EA | last post by:
I am sure I must be missing something about building navigation bars with CSS. Yes it is a very clever and efficient way to format navigation structures on simple one navigation level webs, i.e....
0
by: emalcolm_FLA | last post by:
Hello and TIA for your consideration. I have created several db's for a non-profit and they want custom navigation buttons to display "You are on the first record, last record, etc". With this...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.