Module:Cat see if/doc

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

CodeDiscussionEditHistoryLinksLink count Subpages:DocumentationTestsResultsSandboxLive code All modules

This is the documentation page for Module:Cat see if

There exist (or don't exist) categories in a category system difficult to overview, starting with either

  • Flags
  • Seals
  • Symbols
  • Coats of arms
  • (expandable to more topics)

followed by either 'of' or 'from' and continued with different text, as e.g. ' the community Xxxxx'.

The module is invoked by the template {{Cat see if}} intended to be transcluded from any one of these 8 categories;
it checks which one of these bundle exist and creates a {{Cat see also}} to the other categories, i.e. a maximum of 7.
The selection can be restricted to a maximum of the other 4 or 3 existing categories by a selector, which can be

  • o or of restricting to 'of'-categories
  • f or from restricting to 'from'-categories
  • * restricting to categories (of/from) as the invoking category.

Because of the performance of (max. 7) existence checks the template is considered "expensive".

Example

[edit]

A transclusion of the template {{Cat see if}} within a category e.g. Seals of the Bahamas will check the existence of

when the selector is o: {{ Cat see ifo }} or, in that case, *: {{ Cat see if* }}
  • 'Flags of the Bahamas'
  • 'Symbols of the Bahamas'
  • 'Coats of arms of the Bahamas'
when the selector is f: {{ Cat see iff }}
  • 'Flags from the Bahamas'
  • 'Seals from the Bahamas'
  • 'Symbols from the Bahamas'
  • 'Coats of arms from the Bahamas'
and both groups when no selector is set: {{ Cat see if }}.