Markup spec/BNF/Links

This page references elements defined in Markup spec/BNF/Fundamental elements and Markup spec/BNF/Article title


 * Internal and external links work fundamentally differently in MediaWiki, and should likely be treated separately. --Brion VIBBER 04:08, 29 May 2006 (UTC)


 * Do you mean to separate out their definitions, or to remove the element and add its current definition wherever it would otherwise be used? I think it makes logical sense to keep the top-level definition, but I have separated out the definitions, which I hope will aid clarity. --HappyDog 13:46, 29 May 2006 (UTC)

Internal links
		::=   [ [] ]  []

		::= [] [ | 

	::= ":" ::= STRING_FROM_DB

	::= [ ] ":" ::= STRING_FROM_CONFIG

	::= LEGAL_ARTICLE_ENTITY 	::= []

	::= "" <internal-link-end>	::= ""



Internal link to HTML
URL = <a href=$1?title=$2$3"$4 title="$2">$5$6</a>

Where

if is blank $1 = internal variable $wgScript else $1 = looked up in DB, based on value of $2 = <namespace-prefix> <article-link> If destination page exists $3 = "&amp;amp;action=edit" $4 = " class="new"" else $3 and $4 are blank If is blank $5 = <article-link> else $5 = $6 = <extra-description>