साँचा:URL2/doc
{{
साँचा:namespace detect
| type = notice
| image =
| imageright =
| class =
| style = margin-bottom:1.0em;
| textstyle =
| text = साँचा:strong for साँचा:terminate sentence
It contains usage information, categories and other content that is not part of the original साँचा page.
| small =
| smallimage =
| smallimageright =
| smalltext =
| subst =
| date =
| name =
}}
This template uses Lua: |
This is a fork of Template:URL for use in infoboxes.
It behaves similarly to साँचा:tl with the following exceptions:
- By default it does not display anything if the parameters are blank or omitted. Template:URL displays लुआ त्रुटि: expandTemplate: template "tlx" does not exist। by default.
- It implements a parameter साँचा:para that turns on or off the message साँचा:url. Setting msg to false or anything beginning with n or N will suppress the message. Anything else enables the message.
- It strips html tags and wiki-link markup from the supplied url parameter.
- It truncates the url parameter at the first space it finds.
- It can take its own output as input, allowing website parameters to be wrapped in in the design of an infobox, without causing problems if editors add
|website={{URL|some.url.com}}
in an article.
Usage
{{URL2|url}}
{{URL2|1=url}}
Examples
Different from Template:URL
If there is no input, the default behavior of URL2 is to display nothing (use साँचा:para to display the instructional message): साँचा:nowiki template demo साँचा:nowiki template demo साँचा:nowiki template demo
URL2 handles formatting commonly found in the साँचा:para parameter of an infobox: साँचा:nowiki template demo साँचा:nowiki template demo साँचा:nowiki template demo साँचा:nowiki template demo
Same as Template:URL
The template wraps the output in साँचा:tag (see § Microformat) and adds <wbr/> before displayed periods: साँचा:nowiki template demo
The use of http://, https://, a protocol-relative URL, or a different protocol is preserved in the URL but is not shown in the link text: साँचा:nowiki template demo साँचा:nowiki template demo साँचा:nowiki template demo साँचा:nowiki template demo
If the path is only a slash (/
) it is not displayed in the link text:
साँचा:nowiki template demo
The template also adds <wbr/> before any displayed slashes (/
) in the path:
साँचा:nowiki template demo
For a URL containing an equal sign (=
), use साँचा:para:
साँचा:nowiki template demo
Microformat
The template wraps the displayed URL with class="url"
so that it is included in any parent microformat which takes a URL parameter - see Wikipedia:WikiProject Microformats.
See also