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.
|
|
|
|
|
![]() |
||
Updating Links
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
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 |
|
|
|
|||
|
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 ... |
|
|||
|
Re: Updating Links
Quote:
|
|
|||
|
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:
|
|
|||
|
Re: Updating Links
Sorry, it's missed off that you will need to put <?php before the line of code, and ?> after.
|
|
|||
|
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? |
|
||||
|
Re: Updating Links
Index.php:
|
![]() |
| Tags |
| links, navigation |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| PR4 links for sale...links in an excellent position | agent14 | Link Building and Link Sales | 2 | Aug 6th, 2008 22:01 |
| 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 |
| 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 |