XF 2.0 How do I make an anchor link bbcode?

sub_ubi

Well-known member
Just wondering if there's a guide to making anchor links in bbcode, we have some big posts with a table of contents, anchor links would be great!
 
I'm having issues getting this to work...

The goto tag replacement
goto.png

The anchor tag replacement
anchor.png

then to use it you would do
[goto=key]{text}[/goto]
[anchor=key][/anchor]

Is that correct? What am I doing wrong?
 
then to use it you would do
[goto=key]{text}[/goto]
[anchor=key][/anchor]

Is that correct? What am I doing wrong?

Not sure what your key is in the example. Try something like this:

goto:
<a href="#{option}">{text}</a>
[goto=This takes you to a new location within a post]This takes you to a new location within a post[/goto]

anchor:
<a name="{option}">{text}</a>
[anchor=This is where you jump to]This is where you jump to[/anchor]
 
Wierd. Try this:

jumptoanchor.webp

Paste this into a post:

Code:
[jumpto=1]This takes you to a new location within a post[/jumpto]
.
.
.
.
.
.
.

[jumpto=2]Hello world![/jumpto]
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

[anchor=2]See you soon![/anchor]
.
.
.
.
.
.
.
.
.
.
[anchor=1]This is where you jump to[/anchor]
 
Back
Top Bottom