Links

edit

Oh my. Help:Links on mediawiki.org.

Internal

edit
  • foo [[foo]] – plain link
  • foos [[foo]]s – linktrail, automatically includes certain endings in link (locale-specific)
  • different text [[foo|different text]]
  • foo [[foo|]] – pipe trick: link target as link text
  • foo#Anchor [[foo#Anchor]]
  • #Anchor [[#Anchor]] – anchor relative to current page
  • #REDIRECT [[Main Page]]
  • /subpage [[/subpage]] – links to subpage of current page
  • subpage [[/subpage/]] – links to subpage of current page, sans slash
  • [[Category:Help]] – puts current page in 'Help' category (invisible)
  • Category:Help [[:Category:Help]] – actually links to 'Help' category page
  • [[File:foo.jpg]] – inlines image 'foo.jpg' (Image: prefix is aliased to File:)
  • File:foo.jpg [[:File:foo.jpg]] – links foo.jpg's metadata page
  • Media:foo.jpg [[Media:foo.jpg]] – direct link to image
  • unknown:something [[unknown:something]] – link with colon
  • unknown: [[unknown:]] – link with colon
  • User_talk:Jberkel [[User_talk:Jberkel]] – user talk page
  • User_talk : Jberkel [[User_talk : Jberkel]] – user talk page, spaces around colon

Inter-wiki

edit

Official list of prefixes on meta, generates interwiki.php. Also see per wiki config on Special:Interwiki.

Key Value Example Key Example Value
__global:id (local 0/1) http://lang.domain.tld/path/$1 __global:rfc 0 //tools.ietf.org/html/rfc$1
__sites:wiki-id (= dbname) site name/type (wikimedia, wikinews, ...) __sites:frwiktionary wiktionary
__list:wiki-id space separated list of keys __list:enwiki b chapter n q s v voy wikt
_sitetype:lang 1 //lang.domain.org/wiki/$1 _wiktionary:fr 1 //fr.wiktionary.org/wiki/$1
wiki-id:key (0/1) //lang.domain.tld/wiki/$1 enwiktionary:s 1 //en.wikisource.org/wiki/$1

Editing administrators should remember that the prefix (first column) cannot contain spaces ( ), colons (:), ampersands (&), or equal signs (=). They should avoid likely conflict with languages (en:, fr:, etc). Wikimedia Foundation projects shouldn't be added here, since they are added automatically. Unlike the first column suggests, none of the letters in the prefixes are case sensitive.

  • wikipedia: [[wikipedia:]] – links to English Wikipedia landing page
  • wikipedia:Foo [[wikipedia:Foo]] – links to 'Foo' on English Wikipedia
  • wikipedia:Foo [[wikipedia:Foo]] – links to 'Foo' on English Wikipedia (entity escaped)
  • wikipedia:pt [[wikipedia:pt]] – links to 'pt' on English Wikipedia
  • wikipedia:pt: [[wikipedia:pt:]] – links to Portuguese Wikipedia landing page
  • wikipedia:pt:Foo [[wikipedia:Foo]] – links to 'Foo' Portuguese Wikipedia
  • s: [[s:]] - links English Wikisource landing page
  • s:pt:Foo [[s:pt:Foo]] - links to 'foo' on Wikisource, pt edition

Inter-language

edit
  • pt [[:pt]] – links to 'pt' in current project (main namespace link, same as [[pt]])
  • pt: [[:pt:]] – links to Wiktionary landing page, pt edition
  • pt:foo [[:pt:foo]] — links to 'foo' on Wiktionary, pt edition
  • Baz:foo [[Baz:foo]] — links to 'foo' in 'Baz' namespace
  • [[pt:]] — creates link to current page name on pt Wiktionary in sidebar (invisible)
  • [[pt:foo]] — creates link to 'foo' on pt Wiktionary in sidebar (invisible)

Special

edit

Full List at Special:SpecialPages.

Entries

edit
  • foo – link to 'foo' on Wiktionary
  • foo – link to 'foo' on Wikipedia