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.

{{cite-require-both-or-none
  |name1=
  |parm1=
  |name2=
  |parm2=
  |template=
  |errcat=yes or no
}}
{{cite-require-both-or-none
  |name1=
  |parm1=
  |name2=
  |parm2=
  |template=
}}
{{cite-require-both-or-none
  |name1=url |parm1={{{url|}}}
  |name2=title |parm2={{{title|}}}
  |template=cite web
}}
  • 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.
"https://ml.wikipedia.org/w/index.php?title=ഫലകം:Cite-require-both-or-none&oldid=264412" എന്ന താളിൽനിന്ന് ശേഖരിച്ചത്