Anchors and gotos

Read here for help with getting started on postings.

Moderators: theelanman, Sy V, Elanlover, muley, Enright, GeoffSmith, algirdas, nitroman, clemo, dapinky, Dave Eds, Specky, Nige, DaveT

Anchors and gotos

Postby maz_r » Sun 21.05.2017, 14:25

A feature has been added that allows you to put 'sub-sections' within a post such that you can add clickable links into a long post.

To do this, you need 2 elements:

Firstly a point to jump to, which is called an anchor. This is added by inserting this code into your post:
[anchor=YourAnchorName]Your displayed anchor text[/anchor]


Obviously, YourAnchorName is whatever you decide to call it and needs to be unique within your post. Similarly, Your displayed anchor text is what will be displayed as a sort of section heading.

The second element is a 'goto' This displays a link, which can be clicked on and this will scroll to wherever the corresponding 'anchor' is. You can include multiple 'goto's which will all scroll/jump to the same place. Add a goto using the following code in your post:
[goto=YourAnchorName]Your displayed link text[/goto]


By way of an example, the following code:
Code: Select all
[anchor=contents]Contents[/anchor]
[list]
[goto=testanchor1]Section 1[/goto]
[goto=testanchor2]Section 2[/goto]
[goto=testanchor3]Section 3[/goto]
[/list]

[anchor=testanchor1]Heading for section 1...[/anchor]

Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...

[goto=contents]Return to Contents[/goto]

[anchor=testanchor2]Heading for section 2...[/anchor]

Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...

[goto=contents]Return to Contents[/goto]

[anchor=testanchor3]Heading for section 3...[/anchor]

Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...

[goto=contents]Return to Contents[/goto]



would result in:
Contents

Heading for section 1...

Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...

Return to Contents

Heading for section 2...

Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...

Return to Contents

Heading for section 3...

Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...

Return to Contents


If all of this is complete gobbledegook, please just ignore it :)
There are 10 kinds of people in the world; those that understand binary.....
User avatar
maz_r
Binary Bodger
 
Posts: 610
Joined: Sun 05.07.2009, 20:36
Location: Solihull, West Midlands

Re: Anchors and gotos

Postby dapinky » Sun 21.05.2017, 16:07

Ahh, hyperlinks for techy geeks....... (I understand it :shock: )
Dave

Just the one now, but this one's mine! - and it will be finished eventually.....

go on - click this link - you know you want to!
User avatar
dapinky
Moderator
 
Posts: 7664
Joined: Sun 15.10.2006, 12:54
Location: As far west as you can get in West Wales before you become Irish (Pembroke Dock).

Re: Anchors and gotos

Postby muley » Mon 22.05.2017, 08:46

maz_r wrote:A feature has been added that allows you to put 'sub-sections' within a post such that you can add clickable links into a long post.

To do this, you need 2 elements:

Firstly a point to jump to, which is called an anchor. This is added by inserting this code into your post:
[anchor=YourAnchorName]Your displayed anchor text[/anchor]


Obviously, YourAnchorName is whatever you decide to call it and needs to be unique within your post. Similarly, Your displayed anchor text is what will be displayed as a sort of section heading.

The second element is a 'goto' This displays a link, which can be clicked on and this will scroll to wherever the corresponding 'anchor' is. You can include multiple 'goto's which will all scroll/jump to the same place. Add a goto using the following code in your post:
[goto=YourAnchorName]Your displayed link text[/goto]


By way of an example, the following code:
Code: Select all
[anchor=contents]Contents[/anchor]
[list]
[goto=testanchor1]Section 1[/goto]
[goto=testanchor2]Section 2[/goto]
[goto=testanchor3]Section 3[/goto]
[/list]

[anchor=testanchor1]Heading for section 1...[/anchor]

Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...

[goto=contents]Return to Contents[/goto]

[anchor=testanchor2]Heading for section 2...[/anchor]

Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...

[goto=contents]Return to Contents[/goto]

[anchor=testanchor3]Heading for section 3...[/anchor]

Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...

[goto=contents]Return to Contents[/goto]



would result in:
Contents

Heading for section 1...

Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...

Return to Contents

Heading for section 2...

Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...

Return to Contents

Heading for section 3...

Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...
Lorem ipsum ... etcetera ...

Return to Contents


If all of this is complete gobbledegook, please just ignore it :)



Done.

Jim
"You can take the man out of the Elan, but you can't take the Elan out of the man!"
1995 Red S2 number 750
"LEC turbo nutter" ;)Black MX-5 NC,. Red Honda Integra S
User avatar
muley
Moderator
 
Posts: 3849
Joined: Tue 22.04.2003, 09:07
Location: Wokingham, Berks and Waikanae Beach

Re: Anchors and gotos

Postby clemo » Mon 22.05.2017, 10:04

dapinky wrote:Ahh, hyperlinks for techy geeks....... (I understand it :shock: )


I best stay well away then.
Jim Clark S2 on the way . The one with the Yellow spoke wheels .
User avatar
clemo
Moderator
 
Posts: 4041
Joined: Mon 21.04.2003, 23:24
Location: TORQUAY .WESTSIDE well south west side in the southern bit.


Return to New User Help with Postings and Extras

Who is online

Users browsing this forum: No registered users and 1 guest

cron