Template:Ifurl: Difference between revisions
Jump to navigation
Jump to search
Matt Pijoan (talk | contribs) No edit summary |
Matt Pijoan (talk | contribs) No edit summary |
||
Line 3: | Line 3: | ||
| http:/ | | http:/ | ||
| https:/ = {{{2}}} | | https:/ = {{{2}}} | ||
| #default = {{{3 | | #default = {{{3{{!}}}}} | ||
}}<noinclude> | }}<noinclude> | ||
{{Documentation | {{Documentation | ||
Line 17: | Line 17: | ||
}} | }} | ||
[[Category:If-then-else templates|{{PAGENAME}}]] | |||
</noinclude> | </noinclude> |
Revision as of 15:42, 16 February 2012
{{{3|}}}
File:Test Template Info-Icon - Version (2).svg Template documentation
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}}
→ {{{3|}}}
See also
- {{ifempty}}
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Subpages of this template. |