Ekopedia is in constant extension ! - To be freely part of the project, click here.

User:HertzZ/Sandbox

From Ekopedia

Jump to: navigation, search


But : créer une interface à onglets, notamment pour les pages d'aides (exemple) et les pages utilisateurs (exemple).

Syntaxe : chacune des pages doit contenir le code wiki :

{{Début des onglets
|Onglet-1=Demander une traduction
|URL-1=Projet:Traduction/*/Aide/Demander une traduction
|Onglet-2=Traduire un article
|URL-2=Projet:Traduction/*/Aide/Traduire un article
|Onglet-3=Relire un article
|URL-3=Projet:Traduction/*/Aide/Relire un article
|Onglet-4=Foire aux questions
|URL-4=Projet:Traduction/*/Aide/FAQ
}}

Bla bla bla

{{Fin des onglets
|Onglet-1=Demander une traduction
|URL-1=Projet:Traduction/*/Aide/Demander une traduction
|Onglet-2=Traduire un article
|URL-2=Projet:Traduction/*/Aide/Traduire un article
|Onglet-3=Relire un article
|URL-3=Projet:Traduction/*/Aide/Relire un article
|Onglet-4=Foire aux questions
|URL-4=Projet:Traduction/*/Aide/FAQ
|Onglet-Fin=Revenir au projet traduction
|URL-Fin=Projet:Traduction
}}


Résultat :


<td style="padding:0.3em; border:solid 2px #A3B1BF; text-align:center ; background-color:#CEE0F2; font-size:90%">Demander une traduction</td><td style="border-bottom:solid 2px #A3B1BF" width="2%"> </td> <td style="padding:0.3em; border:solid 2px #A3B1BF; text-align:center ; background-color:#CEE0F2; font-size:90%">Traduire un article</td><td style="border-bottom:solid 2px #A3B1BF" width="2%"> </td> <td style="padding:0 .3em; border:solid 2px #A3B1BF; text-align:center ; background-color:#CEE0F2; font-size:90%">Relire un article</td><td style="border-bottom:solid 2px #A3B1BF" width="2%"> </td> <td style="padding:0 .3em; border:solid 2px #A3B1BF; text-align:center ; background-color:#CEE0F2; font-size:90%">Foire aux questions</td>


Bla bla bla

</div>

Page suivante :
</div>


  • Le nombre maximum d'onglets est de 10. Pour qu'au dernier onglet la page suivante ne soit pas la première vous pouvez définir {{{Onglet-Fin}}} et {{{URL-Fin}}}.
  • Il est possible de définir des paramètres optionnels bordure=, fond onglets= et fond cadre= pour choisir le style de la bordure et les couleurs des onglets et du cadre.
    bordure= et fond onglets= fonctionnent également pour le modèle Template:M.


Exemple:

{{Début des onglets
|Onglet-1=Demander une traduction
|URL-1=Projet:Traduction/*/Aide/Demander une traduction
|Onglet-2=Traduire un article
|URL-2=Projet:Traduction/*/Aide/Traduire un article
|Onglet-3=Relire un article
|URL-3=Projet:Traduction/*/Aide/Relire un article
|Onglet-4=Foire aux questions
|URL-4=Projet:Traduction/*/Aide/FAQ
|bordure=1px solid black
|fond onglets=#EEEEEE
|fond cadre=#EEEFFF
}}

Bla bla bla

{{Fin des onglets
|Onglet-1=Demander une traduction
|URL-1=Projet:Traduction/*/Aide/Demander une traduction
|Onglet-2=Traduire un article
|URL-2=Projet:Traduction/*/Aide/Traduire un article
|Onglet-3=Relire un article
|URL-3=Projet:Traduction/*/Aide/Relire un article
|Onglet-4=Foire aux questions
|URL-4=Projet:Traduction/*/Aide/FAQ
|Onglet-Fin=Revenir au projet traduction
|URL-Fin=Projet:Traduction
|bordure=1px solid black
|fond onglets=#EEEEEE
}}


Résultat :


<td style="padding:0.3em; border:1px solid black; text-align:center ; background-color:#EEEEEE; font-size:90%">Demander une traduction</td><td style="border-bottom:1px solid black" width="2%"> </td> <td style="padding:0.3em; border:1px solid black; text-align:center ; background-color:#EEEEEE; font-size:90%">Traduire un article</td><td style="border-bottom:1px solid black" width="2%"> </td> <td style="padding:0 .3em; border:1px solid black; text-align:center ; background-color:#EEEEEE; font-size:90%">Relire un article</td><td style="border-bottom:1px solid black" width="2%"> </td> <td style="padding:0 .3em; border:1px solid black; text-align:center ; background-color:#EEEEEE; font-size:90%">Foire aux questions</td>


Bla bla bla

</div>

Page suivante :
</div>

</pre>

Personal tools