Template:Ifurl: Difference between revisions

Jump to navigation Jump to search
(Created page with "{{#switch:{{lc:{{#titleparts:{{{1|}}}|2}}}} | ftp:/ | http:/ | https:/ = {{{2}}} | #default = {{{3<noinclude>|</noinclude>}}} }}<noinclude> {{Documentation |content = This tem...")
 
(Undo revision 633398 by Matt Pijoan (talk))
 
(4 intermediate revisions by the same user not shown)
Line 3: Line 3:
| http:/
| http:/
| https:/ = {{{2}}}
| https:/ = {{{2}}}
| #default = {{{3<noinclude>|</noinclude>}}}
| #default = {{{3|}}}
}}<noinclude>
}}<noinclude>
{{Documentation
{{Documentation

Latest revision as of 15:55, 16 February 2012

This template returns one of two arguments, depending on if the first argument is a ftp, http, or https URL. If the scheme is not one of these three, or if the input is not a URL, it returns nothing.

Examples

{{ifurl|http://example.com/foo/bar| true| false}} → true
{{ifurl|https://example.com/foo/bar| true| false}} → true
{{ifurl|foo://example.com/foo/bar| true| false}} → false

See also