Template:Format linkr

Template documentation[view · edit · history · purge]
This documentation is transcluded from Template:Format linkr/doc.
Category:Main message boxesCategory:Lua-based templates

Summary

{{Format link}} {{Format linkr}}
{{format link|Some_Page_With_Underscores}} {{format linkr|Some_Page_With_Underscores}}
Template:Format link Some Page With Underscores
{{format linkr|Template talk:T#%7B%7Bu%7D%7D}} {{format linkr|Template talk:T#%7B%7Bu%7D%7D}}
Template:Format link Template talk:T § {{u}}
{{format link|%E4%BA%BA%E7%9A%84%E6%95%99E5%8C%96}} {{format linkr|%E4%BA%BA%E7%9A%84%E6%95%99E5%8C%96}}
Template:Format link 人的教化
{{format link|Page_With_HTML5_Entities}}{{format linkr|Page_With_HTML5_Entities}}
Template:Format link Page With_HTML5 Entities
{{format link|C++}}{{format linkr|C++}}
Template:Format link C
{{format link|C++}}{{format linkr|C++}}
Template:Format link C++

Usage

This template does exactly what {{Format link}} does, and takes all the same arguments.

This template is intended to lower editor workload when copying links from the URL bar and is not suitable for replacing {{Format link}}, because of the changes it makes to {{Format link}}'s output that could create ambiguity if automatically replaced.

This template replaces any underscores with spaces and decodes any URL parts in {{Format link}}'s output. Some examples of why this may be useful—

{{Format link}}

  • {{format link|People_of_the_Philippines_v._Santos,_Ressa_and_Rappler#Santos_Jr.'s_article|italicizepage=y}}
    Template:Format link
  • {{format link|%E6%9C%AA%E6%9D%A5%E6%97%A5%E8%A8%98#M%61nga}}
    Template:Format link

{{Format linkr}}

  • {{format linkr|People_of_the_Philippines_v._Santos,_Ressa_and_Rappler#Santos_Jr.'s_article|italicizepage=y}}
People of the Philippines v. Santos, Ressa and Rappler § Santos Jr.'s article
  • {{format linkr|%E6%9C%AA%E6%9D%A5%E6%97%A5%E8%A8%98#M%61nga}}
未来日記 § Manga

|nud=

|nud= (no URL decode) can be added to disable URL decoding but still get underscores replaced.

  • {{format linkr|%E6%9C%AA%E6%9D%A5%E6%97%A5%E8%A8%98#M%61_nga|nud=y}}
%E6%9C%AA%E6%9D%A5%E6%97%A5%E8%A8%98 § M%61 nga

Note that you can achieve this through the HTML5 entity _ just as well:

  • {{format linkr|pages%5Fcan’t_contain_underscores#but%5Fsections_may (though their anchors won’t!)}}
pages cant contain underscores § but sections_may (though their anchors wont!)

TemplateData

This template simplifies the process of formatting links from the URL bar by automatically replacing underscores with spaces and decoding URL-encoded parts.

Template parameters

ParameterDescriptionTypeStatus
Page1

The name of the page the link points to. It can include a section after a hashtag (#).

Stringrequired
Italicize pageitalicizepage

Set to 'y' to italicize the page name.

Default
n
Stringoptional
No URL Decodenud

Set to 'y' to prevent URL decoding, while still replacing underscores with spaces.

Default
n
Stringoptional
Category:Internal link templates
Category:Internal link templates Category:Lua-based templates Category:Main message boxes