FANDOM


Export this template, then import, to install it.
Use edit summary: Copied from [[w:c:templates:Template:Ifurl]] to properly attribute this template's editors.
This template is probably not already on your wiki.
Template documentation
Note: the template above may sometimes be partially or fully invisible.

View or edit this documentation. (How does this work?)

Editors can experiment with this template's sandbox and test case pages.
Description
This template checks if the parameter passed is a URL (Uniform Resource Locator), and returns the selected value for true or false.
Dependencies
  • Uses (some CSS, JS, file, or other template).
Syntax
Type {{ifurl|URL|truevalue|falsevalue}} somewhere.
Limitations
Currently, this only checks for http, ftp, and, https, URLs
Notes
This does not validate URLs
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
Wikipedia_small_logo_rounded.png

This page uses Creative Commons licensed content from Wikipedia (view authors).

Community content is available under CC-BY-SA unless otherwise noted.