« Modèle:Hp-chapter-block » : différence entre les versions

De Guide de l'Installation Electrique
Aller à :navigation, rechercher
(modified for migration to MW1.35)
(removed limit=1 in #ask)
 
(Une version intermédiaire par le même utilisateur non affichée)
Ligne 1 : Ligne 1 :
<includeonly>{{#vardefine:chapter-toc-page|{{#ask: [[Category:Eig-ch-landing-pages]] [[Has chapter letter::{{{letter|?}}}]]|link=none|limit=1}}}}{{#vardefine:chapter-icon|Hp-chapter-{{{letter|}}}.png}}<div class="col">
<includeonly>{{#vardefine:chapter-toc-page|{{#ask: [[Category:Eig-ch-landing-pages]] [[Has chapter letter::{{{letter|?}}}]]|link=none}}}}{{#vardefine:chapter-icon|Hp-chapter-{{{letter|}}}.png}}<div class="col">
<div class="hp-chapter">
<div class="hp-chapter">
[[file:{{#var:chapter-icon}} | link={{#var:chapter-toc-page}} | {{{alt-text|missing alt text!}}} | class=hp-chapter-img ]]<h4>[[{{#var:chapter-toc-page}} | {{#tag:span | {{#if: {{{letter|}}} | {{#tag:span | {{{letter|}}}. |class=hp-chapter-letter}}|}}{{#if: {{{link-text|}}}|{{{link-text}}}|{{#var:chapter-toc-page}}}} | title={{{alt-text|missing alt text!}}} }} ]]</h4>{{#if:{{{new|}}}|[[File:icon_new.svg|class=icon_new|link=]]}}</div>
[[file:{{#var:chapter-icon}} | link={{#var:chapter-toc-page}} | {{{alt-text|missing alt text!}}} | class=hp-chapter-img ]]<h4>[[{{#var:chapter-toc-page}} | {{#tag:span | {{#if: {{{letter|}}} | {{#tag:span | {{{letter|}}}. |class=hp-chapter-letter}}|}}{{#if: {{{link-text|}}}|{{{link-text}}}|{{#var:chapter-toc-page}}}} | title={{{alt-text|missing alt text!}}} }} ]]</h4>{{#if:{{{new|}}}|[[File:icon_new.svg|class=icon_new|link=]]}}</div>

Dernière version du 31 octobre 2023 à 16:47


Used to add one chapter "component" on homepage table of content. The "link-text" parameter should generally be omitted (only needed if a chapter page name is too long and needs to be shortened) Two elements are deducted from the chapter-letter:

  • the chapter page name is fetched automatically using semantic properties (#ask)
  • the chapter icon image file name = "File:Hp-chapter-<chapter-letter>.png"

Paramètres du modèle

ParamètreDescriptionTypeÉtat
chapter letterletter

the letter (A..S) of the chapter

Par défaut
A
Exemple
A
Inconnusuggéré
alt text to show on mouse hoveralt-text

The alt text to show on mouse hover

Par défaut
This section introduces the roles of standards and regulations, provides a list of the relevant IEC standards for electrical installation, provides details on standardized voltage ranges, on quality and safety of electrical installations etc ...
Inconnusuggéré
Link textlink-text

The text of the link (if different from the chapter page name)

Inconnufacultatif
newnew

add new=yes to add a NEW icon to the chapter card

Booléenfacultatif