Results 1 to 9 of 9

Thread: Wiki Style Content Links

  1. #1
    2^128. iGoD ReLeNtLeS's Avatar
    Join Date
    May 2010
    Location
    [::1]
    Posts
    1,182
    Thanks
    99
    Thanked 118 Times in 93 Posts
    Rep Power
    1

    Default Wiki Style Content Links

    Right i never really got much help on this over at NT, so i'll try here. I can do basic HTML, or at least the bits i need to know for basic web dev, but i never sussed being able to have a link like wiki where you can redirect to a section of the page.

    i.e:

    Contents
    1
    1.1
    1.2
    2.0
    2.1
    etc where each link will go to a section of the page rather than having several pages on the same topic.

    if we look at the wiki source page we get: (stolen from E.A page)

    {span class="toctext"}Company Structure{/span}

    thats as far a i know, would someone care to shed some light please.

    Many Thanks TTG/iGoD
    i7 3770k || Noctua D14 || Gigabyte Z77X-UD5H || 4 x 2GB G.Skill RipJaws || Gigabyte HD6850 || 3 x BenQ G2220HD - 5760x1080 || Fractel R2
    i5 2500K || Gigabyte P67A-UD4 || 2 x 2GB Viper II Sector 5 || PowerColour HD5770 || Antec 300

  2. #2
    Final Decap InvaderGIR's Avatar
    Join Date
    Nov 2009
    Location
    Guildford
    Posts
    2,070
    Thanks
    24
    Thanked 108 Times in 77 Posts
    Rep Power
    2

    Default

    Is it something to do with the div tags? Not done much HTML for a while to be honest.

  3. #3
    Do you want to play...? Mr. Grapes's Avatar
    Join Date
    May 2010
    Location
    fareham
    Posts
    3,678
    Thanks
    421
    Thanked 343 Times in 285 Posts
    Rep Power
    2

    Default

    they're bookmarks, marked by id

    from the EA page:

    Code:
    span class="mw-headline" id="Criticism"
    it's the id="Criticism" so that if you go to http://en.wikipedia.org/wiki/Electronic_Arts#Criticism
    it's the #criticism part that takes you there.
    edit... Ok I don't know how to disable html parsing so I've left out the < and >
    Orange San Francisco: member #1
    XBMC 11 eden now available. get it here: http://mirrors.xbmc.org/releases/
    BLACK 'n' BLUE: X3360:: P5Q-E::4GB Ballistix::2x6850::Zalman GS1000 Plus case
    Kitchen: E2140@2.0::GA-G31M S2L::2GB Geil::Low Profile GF210

  4. The Following User Says Thank You to Mr. Grapes For This Useful Post:


  5. #4
    2^128. iGoD ReLeNtLeS's Avatar
    Join Date
    May 2010
    Location
    [::1]
    Posts
    1,182
    Thanks
    99
    Thanked 118 Times in 93 Posts
    Rep Power
    1

    Default

    Quote Originally Posted by InvaderGIR View Post
    Is it something to do with the div tags? Not done much HTML for a while to be honest.
    I dont think so, the only div tags i can find is the ones that create the "contents box" and nothing that links to a div tag either. I would copy and paste the code, but google chromes 'inspect element' feature doesn't allow for it.

    EDIT: So {span class="Secondary Header" id="About_Me"}About Me{/span} then link as .../index.html#About_Me

    thats it?
    i7 3770k || Noctua D14 || Gigabyte Z77X-UD5H || 4 x 2GB G.Skill RipJaws || Gigabyte HD6850 || 3 x BenQ G2220HD - 5760x1080 || Fractel R2
    i5 2500K || Gigabyte P67A-UD4 || 2 x 2GB Viper II Sector 5 || PowerColour HD5770 || Antec 300

  6. #5
    Military Grade Tester DoubleTop's Avatar
    Join Date
    Nov 2009
    Location
    In a lamp
    Posts
    9,878
    Thanks
    117
    Thanked 1,453 Times in 908 Posts
    Rep Power
    4

    Default

    in 'old' school html, they are called anchor tags and are very simply referenced as such, if you lookup anchor tags you will find that the more commonly known href is actually an achor tag of type hyperlink

    Code:
    {a name="reference1"}{/a}
    now to place a link on that page that will go to the point in the source

    Code:
    {a href="#reference1"}Jump to anchor point named reference1{/a}
    DT.
    Quote Originally Posted by Aaron View Post
    By the way DT - what happened to the initiation process of them being pink for a few weeks?

  7. The Following User Says Thank You to DoubleTop For This Useful Post:


  8. #6
    Do you want to play...? Mr. Grapes's Avatar
    Join Date
    May 2010
    Location
    fareham
    Posts
    3,678
    Thanks
    421
    Thanked 343 Times in 285 Posts
    Rep Power
    2

    Default

    oh yeah, that's it.
    Code:
     a href="#Criticism"
    it's been so long since i did this I picked up the wrong bit.
    but yeah, a href="#{some text}"
    Orange San Francisco: member #1
    XBMC 11 eden now available. get it here: http://mirrors.xbmc.org/releases/
    BLACK 'n' BLUE: X3360:: P5Q-E::4GB Ballistix::2x6850::Zalman GS1000 Plus case
    Kitchen: E2140@2.0::GA-G31M S2L::2GB Geil::Low Profile GF210

  9. #7
    2^128. iGoD ReLeNtLeS's Avatar
    Join Date
    May 2010
    Location
    [::1]
    Posts
    1,182
    Thanks
    99
    Thanked 118 Times in 93 Posts
    Rep Power
    1

    Default

    Quote Originally Posted by DoubleTop View Post
    in 'old' school html, they are called anchor tags and are very simply referenced as such, if you lookup anchor tags you will find that the more commonly known href is actually an achor tag of type hyperlink

    Code:
    {a name="reference1"}{/a}
    now to place a link on that page that will go to the point in the source

    Code:
    {a href="#reference1"}Jump to anchor point named reference1{/a}
    DT.
    Thanks buddy, took a month and we didnt even get anywhere close to it last time Thanks again

    Thanks to you as well grapes, nothing like late night help

    P.S: Loving this thanking stuff, a lot easier than using the rep system, which would never get used.

    EDIT: Thanks guys, works a treat, glad i got that done with
    i7 3770k || Noctua D14 || Gigabyte Z77X-UD5H || 4 x 2GB G.Skill RipJaws || Gigabyte HD6850 || 3 x BenQ G2220HD - 5760x1080 || Fractel R2
    i5 2500K || Gigabyte P67A-UD4 || 2 x 2GB Viper II Sector 5 || PowerColour HD5770 || Antec 300

  10. #8
    Do you want to play...? Mr. Grapes's Avatar
    Join Date
    May 2010
    Location
    fareham
    Posts
    3,678
    Thanks
    421
    Thanked 343 Times in 285 Posts
    Rep Power
    2

    Default

    Quote Originally Posted by iGoD ReLeNtLeS View Post
    Thanks to you as well grapes, nothing like late night help
    too hot to sleep.... too tired to get the right bit of code
    Orange San Francisco: member #1
    XBMC 11 eden now available. get it here: http://mirrors.xbmc.org/releases/
    BLACK 'n' BLUE: X3360:: P5Q-E::4GB Ballistix::2x6850::Zalman GS1000 Plus case
    Kitchen: E2140@2.0::GA-G31M S2L::2GB Geil::Low Profile GF210

  11. #9
    Ian.H's Avatar
    Join Date
    May 2010
    Location
    NW London
    Posts
    53
    Thanks
    0
    Thanked 2 Times in 2 Posts
    Rep Power
    1

    Default

    Just remember that anchors need to start with an alphabetical letter. Took me some banging the head against the desk some years back while I tried to work out why I couldn't links posts simple as '#1', '#2', etc etc but needed to use something like '#post_1', '#post_2'



    Regards,

    Ian

Posting Permissions

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