Module:Check for clobbered parameters/doc

From Communities for Future wiki
< Module:Check for clobbered parameters
Revision as of 15:43, 16 October 2020 by Kaniivel (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This is the documentation page for Module:Check for clobbered parameters

This module may be appended to a template to check for uses of tuples of conflicting parameters.

Usage

Basic usage

{{#invoke:Check for clobbered parameters|check
|nested=1
|template=Some template name
|cat={{main other|Category:Some tracking category}}
|arg1a; arg1b|arg2a; arg2b; arg2c|...|argNa; argNb}}

Here, (arg1a, arg1b), (arg2a, arg2b, arg2c), are tuples of the conflicting parameters.

By default, the module ignores blank parameters which is useful for {{if empty}} chains of parameters. For nested chains of parameters, use |nested=1 to consider blank parameters as well.

By default, the delimiter for the tuples is ; but this can be changed with |delimiter=.

The value of |template= is used to for the text of the preview warning message. When omitted, the module will use a generic message.

Example 1

{{Infobox
| above = {{{name|}}}

| label1 = Founder{{#if:{{{founders|}}}|s}}
| data1 = {{if empty| {{{founders|}}} | {{{founder|}}} }}

| label2 = Headquarters
| data2 = {{if empty| {{{headquarters|}}} | {{{hq|}}} | {{{location|}}} }}

}}<!-- 
  end infobox, start tracking
-->{{#invoke:Check for clobbered parameters|check
| template = Infobox example
| cat = {{main other|Category:Pages using infobox example with conflicting parameters}}
| founders; founder
| headquarters; hq; location
}}

Example 2

{{Infobox
| above = {{{name|}}}

| label1 = Founder(s)
| data1 = {{{founders|{{{founder|}}}}}}

| label2 = Headquarters
| data2 = {{{headquarters|{{{hq|{{{location|}}}}}}}}}

}}<!-- 
  end infobox, start tracking
-->{{#invoke:Check for clobbered parameters|check
| nested = 1
| template = Infobox example
| cat = {{main other|Category:Pages using infobox example with conflicting parameters}}
| founders; founder
| headquarters; hq; location
}}

See also
https://wiki.communitiesforfuture.org/index.php?title=Module:Check_for_clobbered_parameters/doc&oldid=952
wiki.communitiesforfuture.org
crawl=CC-MAIN-2022-40
28631
application/http; msgtype=response
sha1:PMUXR324IMU433DP3SL23JGXRKJ7WX34
<urn:uuid:d5dfbba7-69b5-4e16-92b0-cf8c49be3a62>
2022-09-30T19:46:22Z
35.214.189.98
text/html
sha1:6R6FDKAOH2ILZ3V4K5YQZQ2KLPGYF3VG
<urn:uuid:22a547fd-8963-4c3e-ad5f-402a8a82aaba>
https://wiki.communitiesforfuture.org/index.php?title=Module:Check_for_clobbered_parameters/doc&oldid=952
response
<urn:uuid:d37228c0-6158-4b83-adb0-c0a0f3c064a4>
isPartOf: CC-MAIN-2022-40
publisher: Common Crawl
description: Wide crawl of the web for September/October 2022
operator: Common Crawl Admin (info@commoncrawl.org)
hostname: ip-10-67-67-28
software: Apache Nutch 1.19 (modified, https://github.com/commoncrawl/nutch/)
robots: checked via crawler-commons 1.4-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/