[Mediawiki-l] Linking to a subject inside a page

Jack D. Pond jack.pond at psitex.com
Sun Jul 1 10:49:39 UTC 2007


This only works if you have a table of contents on the page and, of course,
can be problematic if someone changes the name of the heading, but if you
are willing to accept these limitations:

The table of contents will automatically create heading tags on a page for
reference.  These tags will be in the form of underscore replacing spaces in
headings.  For example

== Test Heading ==

Would create a tag:

Test_Heading

So on a page where you have more than 4 headings and/or forced creation of a
TOC named Test Page,  you could create a reference as

[[Test Page#Test_Heading]]

This is pretty crude, but could work


Jack D. Pond
 
"While it is well enough to leave footprints on the sands of time, it is
even more important to make sure they point in a commendable direction." --
James Branch Cabell(1879-1958)
-----Original Message-----
From: mediawiki-l-bounces at lists.wikimedia.org
[mailto:mediawiki-l-bounces at lists.wikimedia.org] On Behalf Of Willem-Jan van
Strien
Sent: Saturday, June 30, 2007 4:30 PM
To: mediawiki-l at lists.wikimedia.org
Subject: [Mediawiki-l] Linking to a subject inside a page

Let's say I've got a page set up about cats.
In that, I've got a few paragraphs about different kinds of cats.
Those paragraphs are set up in the following format:
== Main Coone ==
text
== Siamese ==
text
, etcetera.

How would I be able to make a link on another page that links directly to
one of those paragraphs?
I've tried [[Siamese]], but that doesn't work of course. That simply throws
me to a page that doesn't exist yet.


_______________________________________________
MediaWiki-l mailing list
MediaWiki-l at lists.wikimedia.org
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l




More information about the MediaWiki-l mailing list