Utilisateur:Speltdecca/switcher2
(traduction de la page en:User:Jackmcbarn/switcher
Switcher2 est un gadget qui permet de passer d'un contenu à l'autre à l'aide de boutons radio.
Usage
modifierPour l'activer sur une page, créez un élément conteneur (div, span, etc.) avec class="switcher-container". A l'intérieur, placez chaque élément pour passer d'un élément à l'autre. Dans chaque élément enfant, ajoutez <span class="switcher-label" style="display:none">Radio button label here</span>
quelque part (peu importe où).
À ce moment-là, switcher2 sera pleinement opérationnel. Si vous voulez qu'un élément autre que le premier soit affiché par défaut, ajoutez data-switcher-default=""
à l'élément switcher-label.
Example
modifier<div class="switcher-container"> <div> First content<span class="switcher-label">First show link</span> </div> <div> Second content<span class="switcher-label" data-switcher-default="">Second show link</span> </div> <div> Third content<span class="switcher-label">Third show link</span> </div> </div>
First contentFirst show link
Second contentSecond show link
Third contentThird show link
Code supportant Switcher2
modifierLe Module:Location map supporte nativement la syntaxe Switcher. Il peut être utilisé pour passer d'une carte à l'autre en l'appelant normalement et en séparant les différents noms de carte par le symbole #. Les modèles qui appellent Module:Location map, comme la plupart des infoboxes, peuvent utiliser cette fonction de la même manière.
Examples
modifierLocation map
modifier{{Location map|United States Los Angeles Western#United States Los Angeles#USA California Southern#USA California#USA | float = none | lat_deg = 34.1014324 | lon_deg = -118.3270755 | caption = [[Broadway Hollywood Building]] }}
Erreur de paramétrage : le modèle de paramétrage de carte "Modèle:Géolocalisation/United States Los Angeles Western#United States Los Angeles#USA California Southern#USA California#USA
" n'existe pas.
Infobox building
modifier{{Infobox building | name = Broadway Hollywood Building | former_names = Bernal H. Dyas Building | alternate_names = Broadway Department Store Building, Broadway Building | status = complete | image = | image_alt = | image_size = | caption = | map_type = United States Los Angeles Western#United States Los Angeles#USA California Southern#USA California#USA | map_alt = | map_caption = | building_type = | architectural_style = [[Classical revival]] | location = [[Hollywood]] | address = 6300 [[Hollywood Boulevard]] or 1645 [[Vine Street]] | location_town = [[Los Angeles, California]] 90028 | location_country = United States | iso_region = | coordinates_display = | coordinates_format = | latitude = 34.1014324 | longitude = -118.3270755 | coordinates = | completion_date = 1928 | opened_date = | inauguration_date = | renovation_date = several | height = | architectural = | tip = | antenna_spire = | roof = | top_floor = | other_dimensions = | floor_count = 10 | elevator_count = | architect = Frederick Rice Dorn | architecture_firm = | awards = | designations = | ren_architect = | ren_firm = | ren_str_engineer = | ren_serv_engineer = | ren_civ_engineer = | ren_oth_designers = | ren_qty_surveyor = | ren_awards = | rooms = | parking = | url = | embedded = | references = }}