Template:Cat handler/numbered/doc

From FamilySearch Wiki
< Template:Cat handler‎ | numbered
Revision as of 23:26, 1 May 2010 by Cottrells (talk | contribs) (Created page with '{{documentation subpage}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> This is the {{tl|cat handler/numbered}} sub-template. Do not use this templa…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


This is the {{cat handler/numbered}} sub-template.

Do not use this template directly, use {{cat handler}} instead. This template is called from {{cat handler}}, see user documentation there.

The rest of the sections here are only for those that want to understand the internal workings of this template.

Technical details[edit source]

This sub-template makes it possible for its parent-template to take input in two forms:

{{cat handler
| 1 = Input
| main = 1
| talk = 1   <!--Reusing "Input" for both the main and talk parameters-->
}}

{{cat handler
| main = Input1
| talk = Input2   <!--Instead feeding text directly to the talk parameter-->
}}

This sub-template takes a bunch of numbered parameters. There's no limit to the number of parameters it can use, other than what the servers and MediaWiki system can handle.

It also takes a parameter named data. If data is a number, then it returns the data of the corresponding numbered parameter. If data is something else, for instance a category name, then it returns data unchanged.

Here's how you would normally call this sub-template:

{{cat handler/numbered
| 1 = {{{1|}}}
| 2 = {{{2|}}}
| 3 = {{{3|}}}
| 4 = {{{4|}}}
| data = Input can be a number between 1-4, or something else.
}}

In the above example, since the parent-template feeds only 1-4, then only the numbers 1-4 will work properly. Feeding other numbers will return an empty string.

See also[edit source]
https://www-a3.familysearch.org/wiki/en/index.php?title=Template:Cat_handler/numbered/doc&oldid=337961
www-a3.familysearch.org
crawl=CC-MAIN-2021-39
55783
application/http; msgtype=response
sha1:N2WCM3YKZHTAX6CQBUASTZCSE7MLEZD6
<urn:uuid:aa10a2b2-63a0-4027-89a3-443485cde756>
2021-09-25T07:14:30Z
52.206.165.216
text/html
sha1:OOFGN6LR7Z4MWLWHBQAJWGCVWCYMG2UZ
<urn:uuid:b93ea181-0a98-425a-a385-0249b2062e64>
https://www-a3.familysearch.org/wiki/en/index.php?title=Template:Cat_handler/numbered/doc&oldid=337961
response
<urn:uuid:8fa38051-46e9-48b9-b4cb-49ee082058c8>
isPartOf: CC-MAIN-2021-39
publisher: Common Crawl
description: Wide crawl of the web for September 2021
operator: Common Crawl Admin (info@commoncrawl.org)
hostname: ip-10-67-67-232
software: Apache Nutch 1.18 (modified, https://github.com/commoncrawl/nutch/)
robots: checked via crawler-commons 1.2-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)
format: WARC File Format 1.1
conformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/