Template:Titlecite
Documentation
This template is called by other templates to format the title part of citations (references). It should not be used in articles (instead, use an appropriate citation template). Other templates handle other parts of a citation, like author/publisher information, dates, etc. (these are listed below).
Usage
These are some common forms; others are possible. The last form shows all of the possible parameters.
{{titlecite|title=}}{{titlecite|url=|title=}}{{titlecite|url=|title=|trans-title=}}{{titlecite|url=|title=|lang=|trans-title=|trans-url=}}{{titlecite|url=|title=|lang=|trans-title=|gt=y}}{{titlecite|url=|title=|local=y}}{{titlecite|url=|title=|local-title=}}{{titlecite|url=|title=|lang=|trans-title=|trans-url=|gt=|local=|local-title=}}
The title must be specified. If there is no obvious title for the resource, just do your best to come up with one that seems appropriate. The other parameters are optional, but cases where there is no url should be quite rare (whenever possible, we should be using online resources that readers can check easily). When specified, the value of url must start with //, https://, or http://.
When the title is not in English, trans-title can be used to provide an English translation of the title. The parameter lang can be used to specify the two- or three-letter ISO 639↗ code of the language of the original resource (for example, lang=no for Norwegian — see Template:lang code to en/doc for a list of currently supported codes). You can use either trans-url or gt to link to an online translation of the resource itself. When possible, gt=y (just a "Boolean" parameter) can be used to automatically link to a Google translation using the original URL (in which case, lang must be provided), otherwise you can provide the full URL of the translation as the value of trans-url. When trans-url or gt is specified but not trans-title, the phrase "English translation" is used.
If this wiki contains an article discussing/summarizing the exact resource being cited, local=y can be used to provide a link to that. This assumes the wiki article is exactly the same as title; if that is not true, then use local-title (set equal to the wiki article title) instead of local=y.
There is also a special parameter not shown above, nocat, which, if set to a true value, prevents any missing-parameter errors from being categorized in Category:Template calls needing input. This should only be done when illustrating bad template calls on template documentation pages, talk pages, or help pages.
Examples
{{titlecite|title=Title}}
⇒ Title.{{titlecite|url=//example.com|title=Title}}
⇒ Title↗.{{titlecite|url=//example.com|title=Title|local=y}}
⇒ Title↗ [local summary].{{titlecite|url=//example.com|title=Tittel|lang=no}}
⇒ Tittel↗ [in Norwegian].{{titlecite|url=//example.com|title=Tittel|lang=no|trans-title=Title}}
⇒ Tittel↗ [in Norwegian] [English: Title].{{titlecite|url=//example.com|title=Tittel|trans-title=Title}}
⇒ Tittel↗ [Title].{{titlecite|url=//example.com|title=Tittel|lang=no|trans-title=Title|trans-url=//www.example.com|local-title=Local Title}}
⇒ Tittel↗ [in Norwegian] [Title↗] [local summary].
Tests
This is not all possible combinations of the parameters, just the most important ones that test the "if-then-else" logic of the template.
{{titlecite}}
⇒ please provide title.{{titlecite|url=//example.com}}
⇒ please provide title.{{titlecite|title=Tittel}}
⇒ Tittel.{{titlecite|url=//example.com|title=Tittel}}
⇒ Tittel↗.
{{titlecite|url=//example.com|title=Tittel|lang=no}}
⇒ Tittel↗ [in Norwegian].{{titlecite|url=//example.com|title=Tittel|trans-title=Title}}
⇒ Tittel↗ [Title].{{titlecite|url=//example.com|title=Tittel|trans-url=//www.example.com/}}
⇒ Tittel↗ [English translation↗].{{titlecite|url=//example.com|title=Tittel|gt=y}}
⇒ Tittel↗ [please provide lang].
{{titlecite|url=//example.com|title=Tittel|lang=no|trans-title=Title}}
⇒ Tittel↗ [in Norwegian] [English: Title].{{titlecite|url=//example.com|title=Tittel|lang=no|trans-url=//www.example.com/}}
⇒ Tittel↗ [in Norwegian] [English translation↗].{{titlecite|url=//example.com|title=Tittel|lang=no|trans-title=Title|trans-url=//www.example.com/}}
⇒ Tittel↗ [in Norwegian] [Title↗].{{titlecite|url=//example.com|title=Tittel|lang=no|gt=y}}
⇒ Tittel↗ [in Norwegian] [English translation↗].
{{titlecite|url=//example.com|title=Tittel|local=y}}
⇒ Tittel↗ [local summary].{{titlecite|url=//example.com|title=Tittel|local-title=Local Title}}
⇒ Tittel↗ [local summary].{{titlecite|url=//example.com|title=Tittel|local=y|local-title=Local Title}}
⇒ Tittel↗ [local summary].
{{titlecite|url=//example.com|title=Tittel|lang=no|trans-title=Title|trans-url=//www.example.com/|gt=y|local=y|local-title=Local Title}}
⇒Tittel↗ [in Norwegian] [Title↗] [local summary].
See also
Citation templates that call this one:
{{cite article}}{{cite by URL}}{{cite web}}
Templates for other parts of citations:
{{accessed}}– date when the resource was accessed to gather the citation information{{authordatecite}}– author and publication date information