Editing
Template:URL/doc
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Usage == * <code><nowiki>{{URL|</nowiki>''example.com''<nowiki>}}</nowiki></code> ** The first parameter is parsed to see if it takes the form of a complete URL. If it doesn't start with a URI scheme (such as "http:", "https:", or "ftp:"), an "http://" prefix will be prepended to the specified generated target URL of the link. ** Parameter 2 (<code><nowiki>{{URL|</nowiki>''url name''<nowiki>|</nowiki>''optional display text''<nowiki>}}</nowiki></code>) is '''deprecated'''. See note above for more information and alternative templates. '''Warning:''' The parameter 1 must be numbered explicitly (<code><nowiki>{{URL|</nowiki>1=''example.com''<nowiki>}}</nowiki></code>) if the URL contains an equal sign, as is common in a query string. This applies when the value of the URL is unknown, for example when this template is used in another template specifying the effective URL as a variable value. The ''deprecated'' second parameter for the displayed text, if present in legacy uses, '''must''' also be explicitly numbered if the first parameter is explicitly numbered (<code><nowiki>{{URL|</nowiki>1=''url name''<nowiki>|</nowiki>2=''optional display text''<nowiki>}}</nowiki></code>); otherwise it will override the value of the first parameter. === Examples === {|class="wikitable" |- ! Code !! Result |- | <code><nowiki>{{</nowiki> {{BASEPAGENAME}} <nowiki>| EXAMPLE.com }}</nowiki></code> | {{ {{BASEPAGENAME}} | EXAMPLE.com }} |- | <code><nowiki>{{</nowiki> {{BASEPAGENAME}} <nowiki>| example.com }}</nowiki></code> | {{ {{BASEPAGENAME}} | example.com }} |- | <code><nowiki>{{</nowiki> {{BASEPAGENAME}} <nowiki>| http://example.com }}</nowiki></code> | {{ {{BASEPAGENAME}} | http://example.com }} |- | <code><nowiki>{{</nowiki> {{BASEPAGENAME}} <nowiki>| www.example.com }}</nowiki></code> | {{ {{BASEPAGENAME}} | www.example.com }} |- | <code><nowiki>{{</nowiki> {{BASEPAGENAME}} <nowiki>| http://www.example.com }}</nowiki></code> | {{ {{BASEPAGENAME}} | http://www.example.com }} |- | <code><nowiki>{{</nowiki> {{BASEPAGENAME}} <nowiki>| https://www.example.com }}</nowiki></code> | {{ {{BASEPAGENAME}} | https://www.example.com }} |- | <code><nowiki>{{</nowiki> {{BASEPAGENAME}} <nowiki>| ftp://www.example.com }}</nowiki></code> | {{ {{BASEPAGENAME}} | ftp://www.example.com }} |- | <code><nowiki>{{</nowiki> {{BASEPAGENAME}} <nowiki>| ftp://ftp.example.com }}</nowiki></code> | {{ {{BASEPAGENAME}} | ftp://ftp.example.com }} |- | <code><nowiki>{{</nowiki> {{BASEPAGENAME}} <nowiki>| http://www.example.com/ }}</nowiki></code> | {{ {{BASEPAGENAME}} | http://www.example.com/ }} |- | <code><nowiki>{{</nowiki> {{BASEPAGENAME}} <nowiki>| http://www.example.com/path }}</nowiki></code> | {{ {{BASEPAGENAME}} | http://www.example.com/path }} |- | <code><nowiki>{{</nowiki> {{BASEPAGENAME}} <nowiki>| irc://irc.example.com/channel }}</nowiki></code> | {{ {{BASEPAGENAME}} | irc://irc.example.com/channel }} |- | <code><nowiki>{{</nowiki> {{BASEPAGENAME}} <nowiki>| www.example.com/foo }}</nowiki></code> | {{ {{BASEPAGENAME}} | www.example.com/foo }} |- | <code><nowiki>{{</nowiki> {{BASEPAGENAME}} <nowiki>| http://www.example.com/path/ }}</nowiki></code> | {{ {{BASEPAGENAME}} | http://www.example.com/path/ }} |- | <code><nowiki>{{</nowiki> {{BASEPAGENAME}} <nowiki>| www.example.com/foo/ }}</nowiki></code> | {{ {{BASEPAGENAME}} | www.example.com/foo/ }} |- | <code><nowiki>{{</nowiki> {{BASEPAGENAME}} <nowiki>| 1=http://www.example.com/path?section=17 }}</nowiki></code> | {{ {{BASEPAGENAME}} | 1=http://www.example.com/path?section=17 }} |- | <code><nowiki>{{</nowiki> {{BASEPAGENAME}} <nowiki>| 1=www.example.com/foo?page=42 }}</nowiki></code> | {{ {{BASEPAGENAME}} | 1=www.example.com/foo?page=42 }} |- | <code><nowiki>{{</nowiki> {{BASEPAGENAME}} <nowiki>| www.example.com | example.com }}</nowiki></code> | {{ {{BASEPAGENAME}} | www.example.com | example.com }} |}
Summary:
Please note that all contributions to Meta Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Meta Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Dark mode
Contributions
Create account
Log in
Namespaces
Template
Discussion
English
Views
Read
Edit source
View history
More
Purge
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information
Get shortened URL