Extension:LinkAttributes

Category:Extensions without an imageCategory:Extensions without a compatibility policyCategory:BSD licensed extensions
MediaWiki extensions manual
Link Attributes
Release status: stableCategory:Stable extensions
Implementation Extended syntax Category:Extended syntax extensions
Description Extends the link syntax to allow custom attributes, such as rel="author"
Author(s) Leo Wallentin, Stano Lacko, Sincerly
Latest version 0.4 (2022-06-16)
MediaWiki 1.19+Category:Extensions with manual MediaWiki version
Database changes No
License BSD 3-clause "Modified" License
Download Category:Extensions in GitHub version control
README
Category:All extensionsCategory:Extensions not in ExtensionJson
Warning Warning: This extension is often confused with the similarly named Extension:Link_Attributes

The LinkAttributes extension extends the link syntax to allow custom attributes, such as rel="author".

Usage

Extra attributes are added at the end of a link, separated with a pipe (|) or a broken pipe (¦), like this:

 [http://www.twitter.com/me my Twitter account|rel=me]

or

 [[User:Me|my userpage|rel=me]]

Allowed properties are: rel, rev, charset, type, hreflang, itemprop, itemscope, media, title, accesskey and target.

In some places (such as inside templates with tables) the pipe can be hard to use, as it has special meanings to MediaWiki. Therefore a broken pipe (¦) will also work with this extension: Oranges¦itemprop=fruit. Note that the following will NOT add an attribute: [[User:James|rel=author]]. The extension has no way of knowing if rel=author is supposed to be an attribute or the actual text to be linked, so the link would have to be written like this: [[User:James|James|rel=author]]. Also note that after installing this extension, pipe characters will not work in link texts.

As itemscope is HTML attribute without value, link have to be written like this: [[Page|Name|itemscope=]].

Installation

See also

Category:Search engine optimization extensions
Category:All extensions Category:BSD licensed extensions Category:Extended syntax extensions Category:Extensions in GitHub version control Category:Extensions not in ExtensionJson Category:Extensions not using extension registration Category:Extensions with manual MediaWiki version Category:Extensions without a compatibility policy Category:Extensions without an image Category:HtmlPageLinkRendererEnd extensions Category:LinkerMakeExternalLink extensions Category:Search engine optimization extensions Category:Stable extensions