SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: self linking

  1. #1
    SitePoint Enthusiast numeropi's Avatar
    Join Date
    Apr 2001
    Location
    somewhere between 3.14 and 3.15
    Posts
    85
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    self linking

    I tend to think that a page should not contain a link to itself, don't know if I read it somewhere. However, this creates a problem in some situations.

    I have a couple of sites where all the pages are based on the same template. Using DreamWeaver, I create a template with editable regions for the links and text, but the logo and heading are fixed. The logo links to the main page (i.e. www.example.com) in all pages, which is fine except for the main page itself. Therefore, I need to create two almost identical templates, one for the main page and another for the rest, the only difference being the logo linking or not.

    Is there a way to improve this?

  2. #2
    SitePoint Zealot sonique's Avatar
    Join Date
    Sep 2001
    Location
    Missouri [U.S.]
    Posts
    135
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well if it's a navigational menu conflict.
    My solution would make the link inactive


    On the main page make links set to..
    Code:
    <?PHP
    <a href="template.php?link='bang'">Bang</a>
    ?>
    user clicks the link

    On the other page have
    Code:
    <?PHP
    if ($link='link1')
     echo{<i>link1</i>;}
     else{echo "<a href='link1.php'>link1</a>";}
    if ($link='bang')
     echo{<i>bang</i>;}
     else{echo "<a href='bang.php'>bang</a>";}
    ?>
    My braces maybe wrong, if so someone should correct it...
    jmulder[THE MENTOR]'s nice guy online!
    Rig: AMD Athlon 800mhz; 384mb SDRam; 32mb nVidia @ 1024x768; ie 6; Windows ME; 15 gig; Cd-RW

  3. #3
    SitePoint Evangelist Umair.ms's Avatar
    Join Date
    Sep 2000
    Location
    Lahore, Pakistan
    Posts
    567
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Theres no harm in self linking when it comes to logo and navigation bar/box.

    What you might have read is to not self link in bread crumbs, the form:

    Home / Build your Site / Server-Side Internet Development / Someone help!

    In this situation it would be better not to make "Someone help!" a hyperlink.
    TinyPlanet.org
    Discuss and Debate World Events, Politics and Religion.
    Interact and Share your Views with People around the Globe.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •