Web Hosting Talk







View Full Version : Having a small issue with links


UnitedPakistan
01-13-2008, 07:18 PM
Alright, my site has lots of pages and links but the problem is if I want to add a new page I have to update every single link on all the pages. I use dreamweaver and is there a solution to this problem?;)

BillBrown
01-14-2008, 03:07 PM
Yes, but it's not going to be a fast solution. The best way to do this is to use an included file for your navigation. I don't know if you have any actual code on your site but if you're using PHP or something like that, you can use includes. Here's an example of a PHP include if you were to be calling for a file called navigation.php:

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

If you were to do this, you would use the include tag where you would normally have the HTML for the navigation list. The navigation.php would then be essentially imported into the page exactly where it was included, within the confinds of the surrounding HTML.

If you use this method, you'd only have to update navigation.php every time you wanted to add to or delete from the navigation list.

gregdavidson
01-14-2008, 04:40 PM
What you need is a CMS or "Content Management System" such as Joomla. I've also heard of software called "Podpress" which is by the makers of Wordpress. I haven't tried it yet but I've seen a few nice looking websites that run off the software.

BillBrown
01-14-2008, 06:19 PM
That would work too. It would be even more work BUT you'd probably much happier with the end result and you'd save so much time by not having to edit everything by hand. :-D

UnitedPakistan
01-15-2008, 09:56 AM
I hate CMS's because none of them are attractive enough for me...

BTW current site is....

www.urbanpk.com

jerett
01-15-2008, 10:12 AM
<?php include("header.html");?>

This is actually the way I like handling sites with menus that might change in the future and consist of numerous pages and you don't have to code your site in PHP, just use the suffix .php instead of .html when your naming the pages that utilize this snippet of code.

I use this method on headers, footers, and even side menus. Basically anything that would be used numerous times on different pages. Works like a charm!