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?
7 1308
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.
Yeah what he ^ said make one file called menu.htm then just include it in all of your pages via php like so: - <?php include('menu.htm') ?>
or - <!--#include virtual="menu.htm" -->
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?
Yeah what he ^ said make one file called menu.htm then just include it in all of your pages via php like so: - <?php include('menu.htm') ?>
or - <!--#include virtual="menu.htm" -->
Do you generally find any cross-browser issues with this sort of code?
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.
Great, thanks for that. I'll give it a try.
Sign in to post your reply or Sign up for a free account.
Similar topics
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...
|
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...
|
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...
|
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...
|
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,...
|
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...
|
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...
|
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....
|
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...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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...
|
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
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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,...
|
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...
|
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...
|
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,...
| |