Template:Lowercase title/doc: Difference between revisions

m
108 revisions imported from wikipedia:Template:Lowercase_title/doc
(It's ridiculous that all improvements (e.g. clearer examples, explanation) are reverted simply because you feel there are a few "strange syntax". The syntax works as intended which provides better portability (templates are often used cross-site. That's why we should improve portability). Please don't revert simply because you don't know what they are for.)
m (108 revisions imported from wikipedia:Template:Lowercase_title/doc)
 
(4 intermediate revisions by 4 users not shown)
Line 1:
{{See also|Template:Nocaps}}
{{Documentation subpage}}
{{nosubstHigh-use}}
{{No substitution}}
{{See also|Template:Nocaps}}
{{TOC right}}
<!-- Please add categories at the bottom of this page, and interwikis at Wikidata (see Wikipedia:Wikidata) -->
 
It is used to decapitalize the first letter of the page's name in the title at the top of the page.
 
== Usage ==
Simply add the tag <code><nowiki>{{tlx|lowercase title}}</nowiki></code> at the topbeginning of a page (and optionally, at the topbeginning of its talk page). There are no parameters. The tag will only decapitalize the first letter of the page's name in the title at the beginning of the page. Examples:
 
{| Classclass="wikitable"
|-
! scope="col" | Page name !! Will display
! scope="col" | Will display
|-
! scope="row" | [[EBay]], [[IPod]], etc. || eBay, iPod, etc.
| eBay, iPod, etc.
|-
! scope="row" | [[Talk:EBay]] || Talk:eBay
| Talk:eBay
|}
 
=== AttentionIssues ===
The template does '''NOTnot''' work together with other title modification templates. In this case: you need to use {{tlx|DISPLAYTITLE}} insteaddirectly and make sure it's the last DISPLAYTITLE on the page. For example, to make "eZoneExample" italic and lowercase, use <code><nowiki>{{DISPLAYTITLE:''eZoneexample''}}</nowiki></code>.
When using the template on redirect pages, the template must be moved '''after''' the redirect. Otherwise it will break the redirection. This, however, limits the template to have an effect only when viewing the redirect page directly. Nevertheless, it is still useful in this scenario in order to document the proper capitalization of a term.
 
When using the template on redirect pages, the template must be moved '''after''' the redirect., since Otherwiseotherwise it will break the redirection. This, however, limits the template to have an effect only when viewing the redirect page directly. Nevertheless, it is still useful in this scenario in order to document the proper capitalization of a term.
 
When using on templates, please make sure to wrap it with a &lt;noinclude&gt; tag, so that transcluded pages don't get affected.
 
=== LimitationsTechnical ===
This template wraps the [[w:en:Help:Magic words|magic word]] DISPLAYTITLE so that it works automatically in any namespace (main, talk, template, etc.) to decapitalise the first letter of the name of a page it is transcluded on.
The template does '''NOT''' work together with other title modification templates. In this case you need to use {{tlx|DISPLAYTITLE}} instead and make sure it's the last DISPLAYTITLE on the page. For example, to make "eZone" italic and lowercase, use <code><nowiki>{{DISPLAYTITLE:''eZone''}}</nowiki></code>.
 
<sourcesyntaxhighlight lang=sql>
== Comparison ==
{{WrongTitleExamples}}
 
== Technical notes ==
This template wraps the [[w:en:Help:Magic words|magic word]] DISPLAYTITLE so that it works automatically in any namespace (main, talk, template, etc.) to decapitalise the first letter of the name of a page it is transcluded on.
 
Here is the actual script:
<source lang=sql>
/* Page using a lowercase title, with or without {{lowercase}} */
SELECT page_title, pp_value AS displaytitle
Line 41 ⟶ 38:
AND CONVERT(pp_value USING utf8mb4) COLLATE utf8mb4_bin /* &#greek; */
REGEXP "^([_ :]+|<[^<>]+>)*([[:lower:]]|&#9[4-6][0-9];)"
</syntaxhighlight>
</source>
 
== TemplateData ==
{{TemplateData header}}
<templatedata>
Line 53 ⟶ 50:
 
== See also ==
* [[w:en:WPWikipedia:Naming conventions (technical restrictions)#Lowercase first letter|Naming conventions (technical restrictions) of lowercase first letter]]
* [[w:en:Help:Magic words|Magic words]]
{{WrongTitleExamples}}
* [[w:en:WP:Naming conventions (technical restrictions)#Lowercase first letter|Naming conventions (technical restrictions) of lowercase first letter]]
 
 
<includeonly>{{sandboxSandbox other||
<!-- Add categories below this line, and interwikis at Wikidata -->
[[Category:Correct title templates]]
}}</includeonly>