ഫലകം:Cite-require-both-or-none
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 both name1 and name2 when using either with 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.
Full syntax
[തിരുത്തുക]{{cite-require-both-or-none |name1= |parm1= |name2= |parm2= |template= |errcat=yes or no }}
Minimum syntax
[തിരുത്തുക]{{cite-require-both-or-none |name1= |parm1= |name2= |parm2= |template= }}
Example
[തിരുത്തുക]{{cite-require-both-or-none |name1=url |parm1={{{url|}}} |name2=title |parm2={{{title|}}} |template=cite web }}
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.