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
how do i do hyperlinks only once so i only make the page and link once
Old 09-02-2008, 09:43 PM how do i do hyperlinks only once so i only make the page and link once
Experienced Talker

Posts: 40
Location: i live with your mom
Trades: 0
On the left hand side of this website http://www.vietnamwebsite.net/duhoc/
There are about 11 hyperlinks. The question is this: This looks like a HUGE site and sometimes in the future lets say this person wanted to add another hyperlink, he would have to change the hyperlinks for EVERY PAGE for example, he would have to change TRANG CHU, DANH BA CHINH, TOP 1000 WEB, etc., all these links and pages.

How can I make it to there I can add another hyperlink without going to EVERY SINGLE PAGE to add that hyperlink. Do you kind of get what I mean?
meloncrack is offline
Reply With Quote
View Public Profile Visit meloncrack's homepage!
 
 
Register now for full access!
Old 09-02-2008, 11:04 PM Re: how do i do hyperlinks only once so i only make the page and link once
thehuskybear's Avatar
Ultra Talker

Posts: 362
Name: Sam
Location: Tucson, AZ
Trades: 1
What you can do is use php (or another server side language such as asp) to include your link files.

So, your pages would look something like this:

PHP Code:
<html>
<head>
    <title>My Page</title>
    <!-- Other Head tags and css stuff ->
</head>
<body>
<div id="sideBar">
   <?php include('links.php'); ?>
</div>
<div id="content">
    <!-- Your page content right here -->
</div>
</body>
</html>
And your links.php page might look like this:

HTML Code:
<ul>
    <li><a href="link1.html">Some link</a></li>
    <li><a href="link1.html">Some link</a></li>
    <li><a href="link1.html">Some link</a></li>
</ul>
You just have to make sure your host will support php and dont forget to give your pages the .php extension. That way you only have to edit links.php... not each page.

Hope that helps
__________________

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

Last edited by thehuskybear; 09-02-2008 at 11:05 PM..
thehuskybear is offline
Reply With Quote
View Public Profile Visit thehuskybear's homepage!
 
Old 09-03-2008, 12:15 AM Re: how do i do hyperlinks only once so i only make the page and link once
Experienced Talker

Posts: 40
Location: i live with your mom
Trades: 0
Thanks bro, but what is <div id="sideBar">
Do I need that? Can you tell me what that does? Thanks bro.
meloncrack is offline
Reply With Quote
View Public Profile Visit meloncrack's homepage!
 
Old 09-03-2008, 01:42 AM Re: how do i do hyperlinks only once so i only make the page and link once
thehuskybear's Avatar
Ultra Talker

Posts: 362
Name: Sam
Location: Tucson, AZ
Trades: 1
You dont need that... a div is just a container to help structure your page. If for example, you wanted to style your links, but only the links in that links.php page, you could add this to your head sections (or in a separate css page-minus the style tag):

HTML Code:
<style>
<!--
div.sideBar a{
    color: #ff0000;
}
//-->
</style>
That would essentially make all of the links ( a ) in your side bar ( div.sideBar ) red ( color: #ff0000 )

If you aren't familiar with css, I recommend you read this
__________________

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

Last edited by thehuskybear; 09-03-2008 at 01:44 AM..
thehuskybear is offline
Reply With Quote
View Public Profile Visit thehuskybear's homepage!
 
Reply     « Reply to how do i do hyperlinks only once so i only make the page and link once
 

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