Vorlage:Accordion panel: Unterschied zwischen den Versionen

This is [[MediaWiki:Tagline]]. Set to <code>display:none</code> by chameleon skin.
Wechseln zu:Navigation, Suche
(Die Seite wurde neu angelegt: „<!-- Start your template code here. for tipps and tools for template development, please refer to our help-section --><noinclude><!-- first define the accordio…“)
 
Keine Bearbeitungszusammenfassung
 
(3 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 1: Zeile 1:
<!-- Start your template code here. for tipps and tools for template development, please refer to our help-section --><noinclude><!-- first define the accordion panel id number -->{{#vardefine:bs_accordion_panel|{{#if:{{#var:bs_accordion_panel}}<!-- apparently there is at least one accordion panel on the page already. increase id num:
<!-- Start your template code here. for tipps and tools for template development, please refer to our help-section --><includeonly><!-- first define the accordion panel id number -->{{#vardefine:bs_accordion_panel|{{#if:{{#var:bs_accordion_panel}}<!-- apparently there is at least one accordion panel on the page already. increase id num:
-->|{{#expr:{{#var:bs_accordion_panel}}+1}}<!-- else first accordion panel. start with 0:
-->|{{#expr:{{#var:bs_accordion_panel}}+1}}<!-- else first accordion panel. start with 0:
-->|0}}<!-- end of #vardefine bs_accordion_panel-->}}<!-- now we can display the panel
-->|0}}<!-- end of #vardefine bs_accordion_panel-->}}<!-- now we can display the panel
-->  <div class="panel panel-default">
-->  <div class="panel panel-default">
     <div class="panel-heading">
     <div class="panel-heading">
       <h4 class="panel-title"><htmltag tagname="a" data-toggle="collapse" data-parent="#accordion{{#var:bs_accordion}}" href="#collapse{{#var:bs_accordion_panel}}">{{{title|{{error|parameter <code>title</code> missing}}}}}</htmltag></h4>
       <h4 class="panel-title"><htmltag tagname="a" data-toggle="collapse" data-parent="#accordion{{#var:bs_accordion}}" href="#collapse{{#var:bs_accordion_panel}}">{{#if:{{{title|}}}|{{{title}}}|ERROR: parameter 'title' missing}}</htmltag></h4>
     </div>
     </div>
     <div id="collapse{{#var:bs_accordion_panel}}" class="panel-collapse collapse {{#ifeq:{{{open|}}}|1|in}}">
     <div id="collapse{{#var:bs_accordion_panel}}" class="panel-collapse collapse {{#if:{{{open|}}}|in|}}">
       <div class="panel-body">{{{body|{{error|parameter <code>body</code> missing}}}}}</div>
       <div class="panel-body">{{#if:{{{body|}}}|{{{body}}}|{{error|parameter <code>body</code> missing}}}}</div>
     </div>
     </div>
   </div><!--Last line of your template code--></noinclude><noinclude>
   </div><!--Last line of your template code--></includeonly><noinclude>
{{documentation}}
{{documentation}}
<!-- Add categories to the /doc subpage, not here! -->
<!-- Add categories to the /doc subpage, not here! -->
</noinclude>
</noinclude>

Aktuelle Version vom 25. November 2017, 23:50 Uhr

Documentation icon Template documentation[view] [edit] [history] [purge]

Description

Set between an {{Accordion begin}} and an {{Accordion end}}, this adds a panel to a bootstrap accordion.

Used variables

bs_accordion
defined by {{Accordion begin}}
id of the current accordion
bs_accordion_panel
id of the last added panel to any accordion
defined by {{Accordion panel}}
increased every time, {{Accordion panel}} is called

Parameters

Description of the entity created by this template or of the function of this template

Vorlagenparameter

ParameterBeschreibungTypStatus
Title of the paneltitle

Defines the title of the panel to add

Standard
Error message
Einzeiliger Texterforderlich
Body of the panelbody

Gives the body text for the panel that shows when open

Standard
Error message
Mehrzeiliger Texterforderlich
Open panelopen

Set to true, of you want this panel to be open from the start

Wahrheitswertoptional

Usage

{{Accordion panel
| title=
| body=
| open=
}}


See also