Updating Links

This is a discussion on "Updating Links" within the Web Page Design section. This forum, and the thread "Updating Links are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Nov 29th, 2006, 10:52
New Member
Join Date: Nov 2006
Location: Washington
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Updating Links

Hello, I was looking for ideas on how to streamline updates. For my website I have a header bar that is the same on every page. The header bar is used for navigation. The site has 20 plus pages, so whenever I need to add a link I have to add it to every page.

Any ideas to make it so I only need to update one page? I am trying to stay away from using frames. If those are still used that is....

Thanks,
Jake

Last edited by mrbernz; Nov 29th, 2006 at 10:53. Reason: Mistype
Reply With Quote

  #2 (permalink)  
Old Nov 29th, 2006, 11:39
SuperMember

SuperMember
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Updating Links

Sure, create a template of one of the pages. Then build all your pages off of the template. When it's time to update the header/navigation, you just do it in the template and the rest of the pages update automatically!

I believe you can also link the header/nav using php but someone else will have to explain that ...
Reply With Quote
  #3 (permalink)  
Old Nov 29th, 2006, 11:55
New Member
Join Date: Nov 2006
Location: Washington
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Updating Links

Quote:
Originally Posted by lchad View Post
Sure, create a template of one of the pages. Then build all your pages off of the template. When it's time to update the header/navigation, you just do it in the template and the rest of the pages update automatically!

I believe you can also link the header/nav using php but someone else will have to explain that ...
So would that be done using CSS? And you do you know of any links that point my in the direction on how to create one? Thanks
Reply With Quote
  #4 (permalink)  
Old Nov 29th, 2006, 12:32
New Member
Join Date: Nov 2006
Location: Newcastle, UK
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Updating Links

The easiest way might be to use a PHP include. Simply create a file that contains the 'header' information (ie: the stuff that remains the same on each page) and call it header.php and save it into a folder called "includes" then in your main pages, put:

PHP: Select all


include("includes/header.php"); 
Then whenever you update header.php this will automagically update every page.
Reply With Quote
  #5 (permalink)  
Old Nov 29th, 2006, 12:33
New Member
Join Date: Nov 2006
Location: Newcastle, UK
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Updating Links

Sorry, it's missed off that you will need to put <?php before the line of code, and ?> after.
Reply With Quote
  #6 (permalink)  
Old Nov 29th, 2006, 23:19
Ryan Fait's Avatar
SuperMember

SuperMember
Join Date: May 2006
Location: Las Vegas
Posts: 3,786
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Updating Links

You also need to change the extention of the pages you're working on. IE index.html to index.php. PHP is the best way.
Reply With Quote
  #7 (permalink)  
Old Dec 1st, 2006, 11:33
New Member
Join Date: Nov 2006
Location: Washington
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Updating Links

All right I need an example of how to make it work.

For simplicty, let's say index.php looks like this:

<html>
<head><title>Title</title></head>
<?php include("includes/header.php");?>
</html>

header.php would be:

<a href="page1.htm>page1</a><br>
<a href="page2.htm>page2</a>


Is that all what is needed? Also, what does the hosting server need, if anything if it supports PHP?
Reply With Quote
  #8 (permalink)  
Old Dec 2nd, 2006, 22:36
Ryan Fait's Avatar
SuperMember

SuperMember
Join Date: May 2006
Location: Las Vegas
Posts: 3,786
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Updating Links

Index.php:

PHP: Select all

<?php
include "header.php";
?>
        <h2>Content</h2>
        <p>A little page specific text about something or other.</p>
<?php
include "footer.php";
?>
header.php:

PHP: Select all

<html>
    <
head>
        <
title>Page Title</title>
    </
head>
    <
body>
        <
h1>Website Name</h1
footer.php:

PHP: Select all

        <p>Copyright © 2006 XXXX</p>
    </
body>
</
html
Reply With Quote
Reply

Tags
links, navigation

Thread Tools

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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Easy way of updating a sites internal links. dcjetski Web Page Design 5 May 27th, 2008 08:44
Msie doesn't make my links links.. delusion Web Page Design 7 Nov 7th, 2007 08:05
PR4 links for sale...links in an excellent position agent14 Link Building and Link Sales 1 Mar 5th, 2007 21:33
Updating Links mrbernz PHP Forum 2 Dec 3rd, 2006 10:19
Blured Links (image links) bruno89 Web Page Design 2 Jul 25th, 2006 14:48


All times are GMT. The time now is 17:43.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43