Forum:How do I link to a heading on another page?

I know how to make a link that scrolls the page to a certain heading

ie like #Heading_1

but how do I link to Heading 1 from another page?

something like

mainpage#Heading_1

I want to have a separate page with references on it, and have a link after each reference that jumps you to that page and scrolls to the relevant reference

Also, I would like to have links in the main menu on the left that jump to specific headers on a page

TIA EvilC 03:12, November 18, 2009 (UTC)


 * You are almost there! Just append the heading name to the pagenane using the hash (#) character as the connector.  will take your reader to the Main page and scroll (if necessary) to make the section heading "Featured article" visible.  If the heading is visible when at the top of a page then the page does not scroll to the heading specified.
 * 60.225.226.219 03:47, November 18, 2009 (UTC)

Ah, it seems that wasn't my problem, as I tried that and it did not work in my instance.

Here is why: This system breaks down if you want to rename your link to something in [square brackets]

So if I want a link to appear like [1]

I try: ([ and ] replaced with so it prints)

<>>

but the WYSIWYG editor reformats this as:

[1]~-start-2-stop

I also noticed in writing this post that if you put a space before it, on it's own line, it will render correctly: [1]

But this is no use to me as the links need to be in the middle of a paragraph.

Wierd. Guess I will have to remove the square brackets from my references links, unless I can find an escape character that stops it interpreting one of the sets of square brackets (I tried the normal \, it didn't work)

EvilC 04:16, November 18, 2009 (UTC)


 * Page. Inspect the source (in code view, not WYSIWYG) and see what I did. 08:24, November 18, 2009 (UTC)
 * The RTE parsed that as (The <>s are HTML aliases too) &lt;nowiki&gt;[&lt;/nowiki&gt;how about this?&lt;nowiki&gt;]~-start-0-stop&lt;/nowiki&gt;
 * Please file this RTE bug via Special:Contact. Thanks! Joey (talk) 08:36, November 18, 2009 (UTC)

When using special characters that the wiki markup parser recognizes and interprets it is best to either wrap them in nowiki tags or replace them with the appropriate HTML code. nowiki tags are the easiest since it's right there in the edit tool bar. FYI the HTML codes for square brackets can be found at ASCII-HTML-Characters which is probably worth bookmarking for future reference.
 * [1] is probably a confusing choice for an inter or intra wiki link because those numbered links are the default format for external links that have not been given a label.

Good luck. -- najevi 13:35, November 18, 2009 (UTC)