« Modèle:Index » : différence entre les versions
Aller à la navigation
Aller à la recherche
Aucun résumé des modifications |
Aucun résumé des modifications |
||
| Ligne 2 : | Ligne 2 : | ||
== Partie {{#var: i}} == | == Partie {{#var: i}} == | ||
{{#if:{{{chapP{{#var:i}}}}}|{{#vardefine:chap|{{#expr:{{{chapP{{#var: i}}}}}}}}}{{#while:|{{#ifexpr:{{#var:j|1}}<= {{#var:chap}}|true }}|<br> | {{#if:{{{chapP{{#var:i}}}}}|{{#vardefine:chap|{{#expr:{{{chapP{{#var: i}}}}}}}}}{{#while:|{{#ifexpr:{{#var:j|1}}<= {{#var:chap}}|true }}|<br> | ||
* [{{PAGENAME}}/Chapitre{{#var:listeChap|1}}|Chapitre{{#var: j}}]]<br>{{#vardefine: j|{{#expr:{{#var:j}}+1}}}}{{#vardefine:listeChap|{{#expr:{{#var:listeChap}}+1}}}}}}}}{{#vardefine:i|{{#expr:{{#var:i}} +1}}}}}}|{{#while:|{{#ifexpr:{{#var:listeChap | * [{{PAGENAME}}/Chapitre{{#var:listeChap|1}}|Chapitre{{#var: j}}]]<br>{{#vardefine: j|{{#expr:{{#var:j}}+1}}}}{{#vardefine:listeChap|{{#expr:{{#var:listeChap}}+1}}}}}}}}{{#vardefine:i|{{#expr:{{#var:i}} +1}}}}}}|{{#vardefine:listeChap|1}}{{#while:|{{#ifexpr:{{#var:listeChap}}<={{#expr:{{{chapP1}}} }}|true}}|<br> | ||
* [[{{PAGENAME}}/Chapitre{{#var:listeChap}}|Chapitre{{#var:listeChap}}]]<br>{{#vardefine: listeChap|{{#expr:{{#var:listeChap}}+1}}}} | * [[{{PAGENAME}}/Chapitre{{#var:listeChap}}|Chapitre{{#var:listeChap}}]]<br>{{#vardefine: listeChap|{{#expr:{{#var:listeChap}}+1}}}} | ||
}} | }} | ||
Version du 11 mai 2011 à 13:09
Ce modèle permet de creer rapidement un index numerique pour un ouvrage
Paramètres
- ouvrage = nom de l'ouvrage (obligatoire)
- auteur = nom de l'auteur (obligatoire)
- parties = nombre de parties dans le livre (facultatif)
- chapPX = nombre de chapitres de la partie X ou de l'ensemble de l'ouvrage si il n'est pas subdivisé en parties (obligatoire)
- ajouter autant de variables chapPX qu'il y a de parties dans l'ouvrage (si l'ouvrage a 3 parties il faut 3 parametres chapP1, chapP2 et chapP3); uniquement chapP1 si il n'y a pas de division en parties.
Exemples
{{index |auteur = Test |parties = 3 |chapP1 = 4 |chapP2 = 6 |chapP3 = 4 }} donnera :
Partie 1
Chapitre 1
Chapitre 2
Chapitre 3
Chapitre 4
Partie 2
Chapitre 1
Chapitre 2
Chapitre 3
Chapitre 4
Chapitre 5
Chapitre 6
Partie 3
Chapitre 1
Chapitre 2
Chapitre 3
Chapitre 4
_____
de plus la page sera automatiquement ajouté aux catégories adequates (nom de l'ouvrage et nom de l'auteur)
{{#if:|
Partie
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
- [Index/Chapitre1
Le nombre maximal de boucles a été effectué
Le nombre maximal de boucles a été effectué
|
Le nombre maximal de boucles a été effectué
[[catégorie:{{{auteur}}}]]