Module:Clade/hidden/doc

Revision as of 20:44, 29 August 2024 by Wikipedia>Warudo (Added the page to Category:Module documentation pages)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This is the documentation page for Module:Clade/hidden

Unknown
Some attributes
First Unknown
Second Unknown
Third Unknown
Other attributes

This module contains the code for {{Clade hidden}}

Useful help page:


Usage

{{#invoke:Clade/hidden|hidden}}


Documentation transcluded from the template

Lua error in Module:TNT at line 159: Missing JsonConfig extension; Cannot load https://commons.wikimedia.org/wiki/Data:I18n/Uses TemplateStyles.tab.

Creates an interactive clade element that is collapsible. The initial state can be collapsed (hidden) or expanded (visible). Interactivity is achieved by clicking appropriate symbols in the cladogram (e.g. ⊞ or ⊟) or custom interactive elements can be added externally with {{clade toggle}}.

This feature is intended to be used sparsely on large clagograms where the whole structure cannot be seen in the screen window.

Parameters

Parameters as {{clade}} with the addition of the following:

  • |expanded=true – sets initial state to expanded (default: hidden)
  • |id= – id to control interactivity; use unique ids for independent behaviour or same ids for shared behaviour
  • |expand-symbol= – symbol for expansion (e.g. ⊞ --> ⊞ or ⨁ --> ⨁)
  • |collapse-symbol= – symbol for collapsing (e.g. ⊟ --> ⊟ or ⨂ -->⨂)
  • |mode=left – position of collapse symbol (left or right of the clade content; default: left)
  • |expand-text=(expand text) – text to replace hidden content
  • |collapse-text=(collapse text) – text to show with collapse symbol (when |mode=right)


Development note: The behaviour of the hidden element when in mobile mode or with javascript disable is controlled in {{clade hidden/styles.css}}. The currentl behaviour is to hide the symbols and leave the expanded content. The following CSS code can hide the content in these modes. However there are currently a couple of issues: width of labels on collapsed elements if on dummy clade; initial state of content when |expanded=true.

table.clade td.clade-interactive  div.mw-collapsible-content { display:none; }

Examples

Template:Clade example