Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Cascading changes throughout the website - without frames
Old 04-17-2008, 09:40 AM Cascading changes throughout the website - without frames
Novice Talker

Posts: 11
Name: Pritesh Madlani
Trades: 0
Hi,

I am currently building a website and am wondering if there is a way that I can change a section on a website once - which then will automatically change on other the other pages.

The website that I am working on is:

http://www.cse.dmu.ac.uk/~p04283218/mainframe8/

As it can be seen - on the left-hand side of the page - there is the navigation section. If I was to add a new link called 'Gallery' (for example), is there an easier way to add it to all the pages - rather than going through them individually?

Your help is much appreciated.
pritmadlani is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-17-2008, 10:55 AM Re: Cascading changes throughout the website - without frames
Gilligan's Avatar
Website Designer

Posts: 1,670
Name: Stefan
Location: London, UK
Trades: 0
Server side includes are most probably what you're looking for, PHP or ASP a just a few examples.

Here's the PHP way:
PHP Code:
<?php include('nav.php'); ?>
and nav.php contains the html code for your navigation menu.
__________________

Please login or register to view this content. Registration is FREE
Gilligan is offline
Reply With Quote
View Public Profile
 
Old 04-17-2008, 11:37 AM Re: Cascading changes throughout the website - without frames
Novice Talker

Posts: 11
Name: Pritesh Madlani
Trades: 0
Hi,

Thanks for the reply. Unfortunately I am not familiar with php at all. I have a very simple navigation section on the left hand side of the page and have no idea at all - how to put it into php. Do you have any helpful websites or any example scripts of coding that can help me?

Thanks,

Pritesh Madlani
pritmadlani is offline
Reply With Quote
View Public Profile
 
Old 04-17-2008, 11:41 AM Re: Cascading changes throughout the website - without frames
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,522
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
The first question should be what server side code can you run? Because if your host doesn't support PHP no amount of code will help.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 04-17-2008, 11:46 AM Re: Cascading changes throughout the website - without frames
Novice Talker

Posts: 11
Name: Pritesh Madlani
Trades: 0
Yeh - as far as I know - the server side does support PHP.

Thanks.
pritmadlani is offline
Reply With Quote
View Public Profile
 
Old 04-17-2008, 11:58 AM Re: Cascading changes throughout the website - without frames
Webmaster Talker

Posts: 560
Trades: 0
Hmm this seems to be popular question the past few days. Put your HTML code that will remain consistent and want on all pages inside a file called let's say "navigation.php"

Then, on all the pages you want "navigation.php" to appear, put in its place:

<?php include('navigation.php'); ?>

Doing this on all the pages will allow you to open up navigation.php and make changes, seeing them reflected on all the pages you put the code above.

Matt
__________________

Please login or register to view this content. Registration is FREE
170 Designs is offline
Reply With Quote
View Public Profile
 
Old 04-18-2008, 09:14 PM Re: Cascading changes throughout the website - without frames
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,985
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
The concept of PHP includes is very easy to learn. The paths work exactly the same way they do in HTML, and the include files can be pure HTML, or HTML with PHP. In order to use PHP, however, the file you are writing code in must have a .php extension, not .html. This will not only be very convenient, as you will be able to affect changes on a broad spectrum of your site (such as headers, footers, or navigation), but dynamic sites like this operate much faster, because the PHP is cached by the server, reducing the amount of time the server must work reading form hard disks to generate HTML.
__________________
Join me on
Please login or register to view this content. Registration is FREE
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 04-19-2008, 09:11 AM Re: Cascading changes throughout the website - without frames
Gilligan's Avatar
Website Designer

Posts: 1,670
Name: Stefan
Location: London, UK
Trades: 0
Heres an easy example

nav.php would contain something like:
Code:
<div>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="reviews.html">Reviews</a></li>
<li><a href="comments.html">Comments</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
</div>

and in your other html page.. REPLACE THIS
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
</head>
<body>
ANY CODE HERE
<div>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="reviews.html">Reviews</a></li>
<li><a href="comments.html">Comments</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
</div>
MORE CODE HERE
OTHER STUFF
FOOTER MAYBE ??
COPYRIGHT NOTICE ??
</body>
</html>
with this:
PHP Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
</head>
<body>
ANY CODE HERE
<?php include('nav.php'?>
MORE CODE HERE
OTHER STUFF
FOOTER MAYBE ??
COPYRIGHT NOTICE ??
</body>
</html>
And if you don't want to deal with .htaccess then its best to save you file as *.php
__________________

Please login or register to view this content. Registration is FREE
Gilligan is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Cascading changes throughout the website - without frames
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.26393 seconds with 12 queries