• Home
  • Random
  • Nearby
  • Log in
  • Settings
Donate Now If Wikipedia is useful to you, please give today.
  • About Wikipedia
  • Disclaimers
Beta Wikipedia

Template:WPBannerMeta/istemplate

  • Template
  • Discussion
  • Language
  • Watch
  • Edit
< Template:WPBannerMeta
Template documentation[view] [edit] [history] [purge]
WarningThis template is used on approximately 10,100,000 pages, or roughly 3616% of all pages.
To avoid major disruption and server load, any changes should be tested in the template's /sandbox or /testcases subpages, or in your own user subpage. The tested changes can be added to this page in a single edit. Consider discussing changes on the talk page before implementing them.

Usage

edit

This {{WPBannerMeta}} subtemplate decides what kind of page and mode of use the template is being on. It performs two checks:

  1. Is the page name the |BANNER_NAME=, or is the page a subpage of that page?
  2. Is |category=yes, |category= (blank), |category=¬ or |category=banana (anything not explicity negative)?

And then combines them together either with logical operator "and" (default) or another logical operator, e.g. "or"; this can be specified in the first unnamed parameter.

Logical operator: and (default behaviour)

edit

This is used by the main template and some hooks. It will return "yes" only if it is on the template page and is not being used as an example (e.g. on its documentation page). In this case the banner will appear in its 'demo' version with all options demonstrated.

Logical operation "and" (default)
Is the current page
BANNER_NAME or a subpage?
Yes No
Is category blank or anything apart from "no"? Yes yes
No

Logical operator: and not

edit

This is used by some hooks. It will return "yes" only if it is not on the template page and is not being used as an example. This is suitable for non-visual output such as categories.

Logical operation "and not"
Is the current page
BANNER_NAME or a subpage?
Yes No
Is category blank or anything apart from "no"? Yes yes
No
The above documentation is transcluded from Template:WPBannerMeta/istemplate/doc. (edit | history)
Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://en.wikipedia.beta.wmcloud.org/w/index.php?title=Template:WPBannerMeta/istemplate&oldid=570672"
Last edited on 3 January 2023, at 14:56

Languages

      This page is not available in other languages.

      Beta Wikipedia
      • Wikimedia Foundation
      • Powered by MediaWiki
      • This page was last edited 14:56, 3 January 2023 by Beta Wikipedia user CX Zoom. Based on work by Beta Wikipedia user Charmlet and Beta Wikipedia anonymous users wikipedia:en>MSGJ and imported>MSGJ.
      • Content is available under CC BY-SA 4.0 unless otherwise noted.
      • Privacy policy
      • About Wikipedia
      • Disclaimers
      • Contact Wikipedia
      • Code of Conduct
      • Developers
      • Statistics
      • Cookie statement
      • Terms of use
      • Desktop