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
Help with pulling content (links) to several pages
Old 12-21-2006, 11:53 AM Help with pulling content (links) to several pages
Average Talker

Posts: 16
Name: brian
Trades: 0
I have a bar of text links on several pages that are all the same, so every time i want to change or add a new link i have to do it on every page. This is getting very time consuming.

How can i have one area (w/links) that i edit and add a code to each page, so the links will get pulled onto every page and i only have to edit one area instead of every page?

Thank you in advance.
seooptimizer is offline
Reply With Quote
View Public Profile Visit seooptimizer's homepage!
 
 
Register now for full access!
Old 12-21-2006, 12:18 PM Re: Help with pulling content (links) to several pages
blackhawkpowers's Avatar
Ultra Talker

Posts: 313
Name: Dustin
Location: GA
Trades: 0
this should be in the php area or asp just for future refrence but will show you here anyway using php (i'm not familiar with other server side langauges)

if your layout looked like this...
HTML Code:
<html>
<body>
<div id="header"> <img scr="banner.jpg"></div>
<div id="nav"> <a href="http://www.google.com"> google </a> <br>
<a href="http://www.google.com"> yahoo </a> <br>
<a href="http://www.dogpile.com">dogpile </a>
</div>
<div id="content">
here is where all of your content is going
</div>
</body>
</html>
you would want to take out the bit for the nave and save it as a different file you can keep the html extention but I normally use .inc for include so we'll say you cut and pasted
<div id="nav"> <a href="http://www.google.com"> google </a> <br>
<a href="http://www.google.com"> yahoo </a> <br>
<a href="http://www.dogpile.com">dogpile </a>
</div>
and saved it as "nav.inc"

when you rewrite the page here save it as index.php and it should look as follows...

PHP Code:
<html>
<body>
<div id="header"> <img scr="banner.jpg"></div>
<? include ('./nav.inc'); ?>
<div id="content">
here is where all of your content is going
</div>
</body>
</html>
so if you wanted to change any of the nav links globally across your site just change nav.inc

hope this helps
__________________
A patch is a piece of software which replaces old bugs with new bugs.

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
blackhawkpowers is offline
Reply With Quote
View Public Profile Visit blackhawkpowers's homepage!
 
Old 12-21-2006, 12:35 PM Re: Help with pulling content (links) to several pages
Average Talker

Posts: 16
Name: brian
Trades: 0
Awesome, thanks for the help this should be just what i'm looking for. Thanks for the quick response!
seooptimizer is offline
Reply With Quote
View Public Profile Visit seooptimizer's homepage!
 
Old 12-21-2006, 01:07 PM Re: Help with pulling content (links) to several pages
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,935
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
Here's the ASP code (adapted from blackhawkpowers' code, TP love given):
Code:
<html>
<body>
<div id="header"> <img scr="banner.jpg"></div>
<!--#include file="/header.asp"-->
<div id="content">
here is where all of your content is going
</div>
</body>
</html> 
Note: we need an ASP code button in here.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
(my blog)


Please login or register to view this content. Registration is FREE
(with proof)
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Reply     « Reply to Help with pulling content (links) to several pages
 

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.54149 seconds with 12 queries