Template:Circa/doc: Difference between revisions
Appearance
Dat Hack3r (talk | contribs) Created page with "{{Tlx|Circa}} generates an abbreviation for ''circa'': {{circa}} By default the abbreviation is marked with an HTML <code><abbr></code> tag, which in most browsers renders as a {{wp|tooltip}} when hovered. Using the date itself as parameter (for example, "{{tlx|circa|1956}}", giving "{{circa|1956}}"), web browsers do not insert a line break anywhere in the string. By contrast, "<code><nowiki>{{</nowiki>circa<nowiki>}}</now..." |
Dat Hack3r (talk | contribs) m Added arrows. |
||
| Line 3: | Line 3: | ||
Using the date itself as parameter (for example, "{{tlx|circa|1956}}", giving "{{circa|1956}}"), web browsers do not insert a line break anywhere in the string. By contrast, "<code><nowiki>{{</nowiki>[[Template:Circa|circa]]<nowiki>}}</nowiki> 1956</code>" allows a line break between the "{{circa}}" and the number. Also, with the date as a parameter a thinner space is used with many browsers: | Using the date itself as parameter (for example, "{{tlx|circa|1956}}", giving "{{circa|1956}}"), web browsers do not insert a line break anywhere in the string. By contrast, "<code><nowiki>{{</nowiki>[[Template:Circa|circa]]<nowiki>}}</nowiki> 1956</code>" allows a line break between the "{{circa}}" and the number. Also, with the date as a parameter a thinner space is used with many browsers: | ||
* {{Tlx|circa|1325}} | * {{Tlx|circa|1325}} → | ||
*: {{circa|1325}} | *: {{circa|1325}} | ||
* {{Tlx|circa|1325 BCE}} | * {{Tlx|circa|1325 BCE}} → | ||
*: {{circa|1325 BCE}} | *: {{circa|1325 BCE}} | ||
* {{Tlx|circa}} 1325 | * {{Tlx|circa}} 1325 → | ||
*: {{circa}} 1325 | *: {{circa}} 1325 | ||
* {{Tlx|circa}} 1325 BCE | * {{Tlx|circa}} 1325 BCE → | ||
*: {{circa}} 1325 BCE | *: {{circa}} 1325 BCE | ||
If the parameter {{para|lk}} (for "link") is set as "{{para|lk|no}}" or "{{para|lk|off}}", the abbreviation is rendered as "{{circa|lk=no}}", without a wikilink or abbreviation element. If it is absent, or set to "{{para|lk|abbr}}", the abbreviation is rendered with the HTML <code><abbr></code> element. If it is set to "{{para|lk|yes}}" or "{{para|lk|on}}", it is rendered as "{{circa|lk=yes}}", with a wikilink to the ''[[:wikt:circa]]'' article in Wiktionary and ''not'' an abbreviation element. {{para|lk|no}} can be used to avoid {{wp|overlinking}} when this template is used repeatedly in the body of an article. | If the parameter {{para|lk}} (for "link") is set as "{{para|lk|no}}" or "{{para|lk|off}}", the abbreviation is rendered as "{{circa|lk=no}}", without a wikilink or abbreviation element. If it is absent, or set to "{{para|lk|abbr}}", the abbreviation is rendered with the HTML <code><abbr></code> element. If it is set to "{{para|lk|yes}}" or "{{para|lk|on}}", it is rendered as "{{circa|lk=yes}}", with a wikilink to the ''[[:wikt:circa]]'' article in Wiktionary and ''not'' an abbreviation element. {{para|lk|no}} can be used to avoid {{wp|overlinking}} when this template is used repeatedly in the body of an article. | ||
* {{Tlx|1=circa|2=1325|3=lk=yes}} | * {{Tlx|1=circa|2=1325|3=lk=yes}} → | ||
*: {{circa|1325|lk=yes}} | *: {{circa|1325|lk=yes}} | ||
* {{Tlx|1=circa|2=1325|3=lk=no}} | * {{Tlx|1=circa|2=1325|3=lk=no}} → | ||
*: {{circa|1325|lk=no}} | *: {{circa|1325|lk=no}} | ||
To denote a date range, use multiple parameters or pass a single parameter denoting the range. | To denote a date range, use multiple parameters or pass a single parameter denoting the range. | ||
* {{Tlx|circa|1000|1050}} | * {{Tlx|circa|1000|1050}} → | ||
*: {{circa|1000|1050}} | *: {{circa|1000|1050}} | ||
* {{Tlx|circa|1000–1050}} (another option for a range, but prefer {{tlx|circa|1000|1050}}) | * {{Tlx|circa|1000–1050}} (another option for a range, but prefer {{tlx|circa|1000|1050}}) → | ||
*: {{circa|1000–1050}} | *: {{circa|1000–1050}} | ||
| Line 31: | Line 31: | ||
"params": { | "params": { | ||
"1": { | "1": { | ||
"label": " | "label": "Year", | ||
"type": " | "type": "date", | ||
"suggested": true, | "suggested": true, | ||
"description": "An approximate date", | "description": "An approximate date", | ||
| Line 38: | Line 38: | ||
}, | }, | ||
"2": { | "2": { | ||
"label": " | "label": "End year", | ||
"type": " | "type": "date", | ||
"description": "Use when the start and end dates of a range are both approximate.", | "description": "Use when the start and end dates of a range are both approximate.", | ||
"example": "1980" | "example": "1980" | ||
}, | }, | ||
"sortable": { | "sortable": { | ||
"label": " | "label": "Sortable", | ||
"description": "Set to “yes” for values in sortable tables", | "description": "Set to “yes” for values in sortable tables", | ||
"suggestedvalues": [ | "suggestedvalues": [ | ||
| Line 52: | Line 52: | ||
}, | }, | ||
"lk": { | "lk": { | ||
"label": " | "label": "Link", | ||
"description": "If | "description": "If \"on\", a link is added to the wiktionary article for circa. If ‘off’, the c. does not link or tooltip “circa”. Should be set to \"off\" for the second and subsequent uses of this template. (Values ‘yes’ or ‘no’ may also be used.)", | ||
"type": "string", | "type": "string", | ||
"suggestedvalues": [ | "suggestedvalues": [ | ||
| Line 67: | Line 67: | ||
"sortable" | "sortable" | ||
], | ], | ||
"description": "This template generates an abbreviation for circa." | "description": "This template generates an abbreviation for circa.", | ||
"format": "inline" | |||
} | } | ||
</templatedata> | </templatedata> | ||