Template:URL is permanently protected from editing because it is a heavily used or highly visible template. Substantial changes should first be proposed and discussed here on this page. If the proposal is uncontroversial or has been discussed and is supported by consensus, editors may use {{edit template-protected}} to notify an administrator or template editor to make the requested edit. Usually, any contributor may edit the template's documentation to add usage notes or categories.
Any contributor may edit the template's sandbox. Functionality of the template can be checked using test cases.
This template was considered for deletion on 2016 October 8. The result of the discussion was "no consensus to merge".
This template does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects:
URL is part of, or of interest to, WikiProject Microformats, which encourages the deployment of microformats in Wikipedia, and documents them in the article space. If you would like to participate, visit the project page.MicroformatsWikipedia:WikiProject MicroformatsTemplate:WikiProject MicroformatsMicroformats
This page has archives. Sections older than 28 days may be automatically archived by Lowercase sigmabot III when more than 3 sections are present.
Long URL in infobox
I was expecting template:URL would wrap the long URL in EMBiology, does anyone know why it doesn't? currently the infobox occupies a large fraction of the page width. ~thanks. fgnievinski (talk) 02:05, 5 August 2022 (UTC)[reply]
@Fgnievinski:EMBiology doesn't use {{URL}}. If you are talking about previewing a version which does use {{URL}} then what is your browser? In my Firefox, it already wraps now without {{URL}}. In Edge it doesn't wrap now but it wraps in a preview with {{URL}}. PrimeHunter (talk) 02:25, 5 August 2022 (UTC)[reply]
@PrimeHunter: I just noticed this was changed a few years ago (link). Do you know what's the best practice in other templates? are users expected to wrap bare URLs in the the URL template or do templates do the wrapping automatically as a courtesy to users? and is template URL safe to abuse when it's input to itself? I ask because now template:infobox bibliographic database has a mixture of usage patterns. thanks for your help. fgnievinski (talk) 19:16, 5 August 2022 (UTC)[reply]
@Fgnievinski:{{URL}} requires a raw url. {{URL| {{URL|http://example.org}} }} or {{URL|[http://example.org website]}} fails. {{URL}} is from before MediaWiki got modules. The template language has very limited string processing. {{URL}} is now implemented by Module:URL and it would be possible to test the parameter and do nothing if it's not a raw url. Infoboxes with displayed website parameters generally require the caller to add {{URL}} for improved formatting. PrimeHunter (talk) 19:45, 5 August 2022 (UTC)[reply]
Is there any reason to trim "www" from the displayed URL?
Template:URL is designed to display the "www" as part of the link displayed and is clear that "Parameter 2 ({{URL|url name|optional display text}}) is deprecated"; I certainly don't see any reason to manually remove the "www" using parameter 2. Is there any reason to make edits such as this one, one example of many, whose only purpose is to trim the "www"? There was this discussion from 2020 that leaned against removal of the "www". Does this still stand and if so should there be a clearer admonition in Template:URL discouraging the practice? Alansohn (talk) 17:21, 12 August 2024 (UTC)[reply]
I would describe that edit as mildly negative, not helpful. It made the displayed URL longer, wrapping it in my display. The previous, shorter URL did not wrap. Since |2= is deprecated, a better edit would have been to remove "www" from |1= while removing |2=, after checking that the resulting URL worked, of course. – Jonesey95 (talk) 21:18, 12 August 2024 (UTC)[reply]