Template:Cite-require-both-or-none
From Wikipedia, the free encyclopedia
This inner-template checks for proper use of template parameters that require each other, displays errors, and optionally categorizes the article for repair.
If the user of the calling template supplies values for only one of the parmn parameters, the text You must specify name1 and name2 when using template. is displayed on the page. If errcat=yes is specified (or defaulted to) and the page is a main-space article, the page is also added to the error category Category:Articles with broken citations.
Ironically, this template requires three parameters of its own (name1, name2, and template), but does not check for them and categorize their mis-use, although it does at least display "PARAMETERNAME UNSPECIFIED" in their place if needed.
Contents |
[edit] Full syntax
{{cite-require-both-or-none |name1= |parm1= |name2= |parm2= |template= |errcat=yes or no }}
[edit] Minimum syntax
{{cite-require-both-or-none |name1= |parm1= |name2= |parm2= |template= }}
[edit] Example
{{cite-require-both-or-none |name1=archivedate |parm1={{{ArchiveDate|}}} |name2=archive-chapter-url or archive-contribution-url |parm2={{{IncludedArchiveURL|}}} |template=Citation }}
[edit] Parameters
- errcat — Should the page be added to the error category Category:Articles with broken citations? Defaults to errcat=yes. Only main-space pages (i.e., articles) will be categorized – errcat=yes is ignored for all other spaces (e.g., "WP:" pages, talk pages, user pages, etc.).
- name1 — The name of the first parameter to check, as users of the calling template specify it. For example, "url" for {{cite web}}.
- name2 — The name of the second parameter to check, as users of the calling template specify it. For example, "title" for {{cite web}}.
- parm1 — The value of the first parameter to check.
- parm2 — The value of the second parameter to check.
- template — The name of the calling template as users specify it.