« Modèle:Documentation » : différence entre les versions

Contenu supprimé Contenu ajouté
Starus (discussion | contributions)
Aucun résumé des modifications
Ligne 1 :
<div style="clear:both;margin:0.3em 0;border:1px solid #AAAAAA;background-color:#EEEEFF;padding:5px" class="template-documentation"><!--
<includeonly>{{#invoke:Documentation|corps}}</includeonly><noinclude>{{documentation}}</noinclude>
Voici des définitions littérales de classe pour common.css :
/* Pour la documentation des modèles */
.template-documentation {
clear: both;
margin: 0.3em 0;
border: 1px solid #AAAAAA;
background-color: #ECFCF4;
padding: 5px;
}
 
** ENTÊTE STANDARD AVEC ICÔNE **
-->{{#ifeq:{{{heading|μ}}}|<!-- heading DÉFINI MAIS VIDE -->|<!--
** SUPPRIME L’ENTÊTE AVANT LES LIENS, content OU SOUS-PAGE DE DOCUMENTATION **
-->|<!--
--><div style="border-bottom: 1px solid #AAAAAA;padding-bottom:3px;margin-bottom:1ex"><!--
--><span style="<!--
-->{{#if:{{{heading-style|}}}|<!--
-->{{{heading-style}}}<!--
-->|<!--
-->{{#ifeq:{{NAMESPACE}}|{{ns:template}}|<!--
-->font-weight:bold;font-size:125%<!--
-->|<!--
-->font-size:150%<!--
-->}}<!--
-->}}"><!--
-->{{#if:{{{heading|}}}|<!--
-->{{{heading}}}<!--
-->|<!--
-->{{#ifeq:{{NAMESPACE}}|{{ns:template}}|<!--
-->[[Image:Template-info.svg|50px]] Documentation du modèle<!--
-->|<!--
-->Documentation<!--
-->}}<!--
-->}}<!--
--></span><!--
--></div><!--
-->}}<!--
 
** LIENS VERS SOUS-PAGES DE DOCUMENTATION, BAC À SABLE ET TESTS **
--><div id="template_doc_page_transcluded" class="dablink"><!--
 
-->{{#ifeq:{{{1|{{Documentation/docname}}}}}|{{FULLPAGENAME}}|<!--
** LIEN VERS LA PAGE DU MODÈLE, AFFICHÉ SUR UNE SOUS-PAGE DE DOCUMENTATION**
--><nowiki />
: ''Ceci est la page de documentation de '''[[{{NAMESPACE}}:{{BASEPAGENAME}}]]'''.'' <!--
--><small class="plainlinks" style="font-style:normal"><!--
-->[[{{fullurl:{{FULLPAGENAME}}|action=purge}} rafraîchir]]<!--
--> '''·''' <!--
-->{{#ifexist:{{{1|{{NAMESPACE}}:{{BASEPAGENAME}}}}}|<!--
** LE MODÈLE DE BASE EXISTE DÉJÀ **
-->[[{{fullurl:{{{1|{{NAMESPACE}}:{{BASEPAGENAME}}}}}|action=edit}} modifier]]<!--
-->|<!--
** LE MODÈLE DE BASE N’EXISTE PAS ENCORE **
-->[[{{fullurl:{{{1|{{NAMESPACE}}:{{BASEPAGENAME}}}}}|action=edit}} créer]]<!--
-->}}<!--
--> '''·''' <!--
-->[[{{fullurl:{{{1|{{NAMESPACE}}:{{BASEPAGENAME}}}}}|action=history}} historique]]<!--
--></small><!--
-->|<!--
** LIEN VERS SOUS-PAGE DE DOCUMENTATION, AFFICHÉ SUR LA PAGE DU MODÈLE ELLE-MÊME **
-->{{#ifexist:{{{1|{{Documentation/docname}}}}}|<!--
** /Documentation EXISTE **
--><nowiki />
: ''Cette [[Wikilivres:Modèles|documentation]] est [[w:Aide:Inclusion|incluse]] depuis '''[[{{{1|{{Documentation/docname}}}}}]]'''.''<!--
--><small class="plainlinks" style="font-style:normal"><!--
-->[[{{fullurl:{{FULLPAGENAME}}|action=purge}} rafraîchir]]<!--
--> '''·''' <!--
-->[[{{fullurl:{{{1|{{Documentation/docname}}}}}|action=edit}} modifier]] <!--
--> '''·''' <!--
-->[[{{fullurl:{{{1|{{Documentation/docname}}}}}|action=history}} historique]]<!--
--></small><!--
-->|<!--
** /Documentation N’EXISTE PAS ENCORE **
--><nowiki />
: ''Documentation de '''[[{{NAMESPACE}}:{{BASEPAGENAME}}]]'''.''{{#ifeq:{{NAMESPACE}}|Modèle|{{#if:{{{nocat|}}}||[[Catégorie:Documentations des modèles|{{PAGENAME}}]]}}}}<!--
--><small class="plainlinks" style="font-style:normal"><!--
-->[[{{fullurl:{{FULLPAGENAME}}|action=purge}} rafraîchir]]<!--
--> '''·''' <!--
-->[[{{fullurl:{{{1|{{Documentation/docname}}}}}|action=edit&preload={{urlencode:Modèle:documentation/patron}}}} créer]]<!--
--> '''·''' <!--
-->[[{{fullurl:{{{1|{{Documentation/docname}}}}}|action=history}} historique]]<!--
--></small><!--
-->}}<!--
-->}}<!--
 
-->{{#switch: {{SUBPAGENAME}}<!--
-->|bac à sable|tests<!--
--><!--=--><!-- ne pas mettre le "=" en commentaire pour
** NE PAS AFFICHER CES LIENS SUR LES PAGES DE BAC À SABLE/TESTS **
-->|#default<!--
-->=<!--
-->{{#switch: {{SUBJECTSPACE}}<!--
-->|{{ns:template}}<!--
-->|{{ns:user}}<!--
-->=<!--
-->{{#ifexist: {{FULLPAGENAME}}/bac à sable|<!--
--><br /><!--
-->Ce modèle dispose d’un [[/bac à sable|bac à sable]] <small style="font-style: normal">([{{fullurl:{{#rel2abs:/bac à sable}}|action=edit}} modifier])</small> <!--
-->{{#ifexist: {{FULLPAGENAME}}/tests|<!--
-->et d’une page de [[/tests|tests]] <small style="font-style:normal">([{{fullurl:{{#rel2abs:/tests}}|action=edit}} modifier])</small><!--
-->}}<!--
--> permettant aux éditeurs d’expérimenter leurs modifications.<!--
-->|<!--
-->{{#ifexist: {{FULLPAGENAME}}/tests|<!--
--><br /><!--
-->Ce modèle dispose d’une page de [[/tests|tests]] <small style="font-style:normal">([{{fullurl:{{#rel2abs:/tests}}|action=edit}} modifier])</small><!--
--> permettant aux éditeurs d’expérimenter avec ce modèle ou de démontrer des anomalies.<!--
-->}}<!--
-->}}<!-- endifexist
-->}}<!-- endswitch subjectspace
-->}}<!-- endswitch subpagename
--></div><!--
 
** AFFICHAGE DU CONTENU OU INCLUSION DE LA SOUS-PAGE DE DOCUMENTATION (SAUF SUR LA PAGE D’AIDE ELLE-MÊME) **
-->{{#if:{{{contenu|{{{content|}}}}}}|<!--
--><nowiki />
{{{contenu|{{{content|}}}}}}<!--
-->|<!--
-->{{#ifeq:{{{1|{{Documentation/docname}}}}}|{{FULLPAGENAME}}|<!--
** PAS DE RÉCURSION SUR LA PAGE DOCUMENTATION ELLE-MÊME, QUI CONTIENT LE RESTE DU TEXTE APRÈS CE MODÈLE **
-->{{#if:{{{nocat|}}}||[[Catégorie:Documentations des modèles|{{PAGENAME}}]]}}|<!--
-->{{#ifexist:{{{1|{{Documentation/docname}}}}}|<!--
--><nowiki />
{{{{{1|{{Documentation/docname}}}}}|
{{{2|dummy}}}={{{3|}}}|
{{{4|dummy}}}={{{5|}}}|
{{{6|dummy}}}={{{7|}}}|
{{{8|dummy}}}={{{9|}}}<!--
-->}}<!--
-->}}<!--
-->}}<!--
-->}}<!--
 
--><div style="clear:both"></div>
</div><!--
 
NOTE :
TOUTE LA DOCUMENTATION POUR CE MODÈLE EST INCLUSE CI-DESSUS DEPUIS SA SOUS-PAGE /Documentation
Les catégories et interwikis sont donc inscrits dans [[Modèle:Documentation/Documentation]]
 
{{NoRobot}}
-->
<noinclude>
Ce modèle peut se poser sur tout [{{fullurl:Spécial:Toutes les pages|from=&to=&namespace=10}} autre], ou sur [[:Catégorie:Documentation de modèle|leurs documentations]]. Il affiche ensuite automatiquement un titre approprié avec la catégorie à appliquer à la page. <!--Il ne peut pas s'utiliser sur lui-même-->
 
Exemple :
<nowiki>&lt;noinclude>{{Documentation}}&lt;/noinclude></nowiki>
 
Si la page de documentation n'existe pas, ce modèle affiche un lien permettant de la créer, avec pour patron le contenu de la page suivante : [[Modèle:Documentation/patron]].
 
Si la page de documentation est située ailleurs, son titre peut être spécifié en paramètre.
Par exemple si le modèle contient lui-même sa documentation :
<nowiki>&lt;noinclude>{{Documentation|{{FULLPAGENAME}}}}&lt;/noinclude></nowiki>
 
[[Catégorie:Documentation de modèle|{{PAGENAME}}]]
</noinclude>