Difference between revisions of "Template:IT/Documentation/MasterTOC"

From Apache OpenOffice Wiki
Jump to: navigation, search
Line 1: Line 1:
 
<div id="tocwrapper" class="docooo_tocwrapper" style="float:right;  width: 200px; padding: 0px; border: 3px solid #fff; border-left: 20px solid #fff; border-bottom: 20px solid #fff; margin-left: 40px; margin-bottom: 20px; margin-top: -5px;">
 
<div id="tocwrapper" class="docooo_tocwrapper" style="float:right;  width: 200px; padding: 0px; border: 3px solid #fff; border-left: 20px solid #fff; border-bottom: 20px solid #fff; margin-left: 40px; margin-bottom: 20px; margin-top: -5px;">
 +
<!--
 
   <div id="icon" style="float:right; margin-right: -10px; margin-top: -10px;">[[Image:Book.png]]</div>
 
   <div id="icon" style="float:right; margin-right: -10px; margin-top: -10px;">[[Image:Book.png]]</div>
   <div id="{{{bookid}}}" style="border:1px solid #9099a8; padding: 0px; font-size: xx-small; background-color: #FFF;">
+
//-->
     <div id="doc_toctitle" class="docooo_toctitle" style="background-color: #c5d0e1; border: 0px solid #9099a8; padding: 1px;font-weight: bold; text-align: left; font-size:120%;">{{{booktitle}}}</div>
+
   <div id="{{{bookid}}}" style="border:1px solid #9BC0F5; padding: 0px; font-size: xx-small; background-color: #FFF;">
 +
     <div id="doc_toctitle" class="docooo_toctitle docsection">{{{booktitle}}}</div>
 
     <div id="parttitle" class="docooo_parttitle" style="padding: 1px;font-weight: bold; text-align: left; border-bottom: 1px solid #9099a8; display:{{{ShowParttitle|none}}}">
 
     <div id="parttitle" class="docooo_parttitle" style="padding: 1px;font-weight: bold; text-align: left; border-bottom: 1px solid #9099a8; display:{{{ShowParttitle|none}}}">
 
: {{{parttitle}}}
 
: {{{parttitle}}}
Line 8: Line 10:
 
{|border=0 width=100%
 
{|border=0 width=100%
 
|-
 
|-
|style="text-align:left;"|<span style="display: {{{ShowPrevPart|none}}}">[[{{{PrevPart}}}|&lt; Partie précédente]]</span>
+
|style="text-align:left;"|<span style="display: {{{ShowPrevPart|none}}}">[[{{{PrevPart}}}|&lt; Previous Section]]</span>
|style="text-align:right;"|<span style="display: {{{ShowNextPart|none}}}">[[{{{NextPart}}}|Partie suivante &gt;]]</span>
+
|style="text-align:right;"|<span style="display: {{{ShowNextPart|none}}}">[[{{{NextPart}}}|Next Section &gt;]]</span>
 
|}
 
|}
 
</div>
 
</div>
Line 19: Line 21:
 
{|border=0 width=100%
 
{|border=0 width=100%
 
|-
 
|-
|style="text-align:left;"|<span style="display: {{{ShowPrevPage|none}}}">[[{{{PrevPage}}}|&lt; Page précédente]]</span>
+
|style="text-align:left;"|<span style="display: {{{ShowPrevPage|none}}}">[[{{{PrevPage}}}|&lt; Indietro]]</span>
|style="text-align:right;"|<span style="display: {{{ShowNextPage|none}}}">[[{{{NextPage}}}|Page suivante &gt;]]</span>
+
|style="text-align:right;"|<span style="display: {{{ShowNextPage|none}}}">[[{{{NextPage}}}|Avanti &gt;]]</span>
 
|}
 
|}
 
</div>
 
</div>
Line 28: Line 30:
 
<noinclude>
 
<noinclude>
  
==Utilisation des paramètres==
+
==Usage of Parameters==
;ShowPrevPage:Définir à "block" pour montrer le lien "Page précédente" et à "none" pour le cacher. Ce paramètre n'est pas défini dans la TDM (TDM=Table des matières, TOC=Table of contents) basée sur ce modèle, mais plutôt dans la page contenant cette TDM. La valeur du paramètre est donc "passée à travers" la TDM à ce modèle et doit être explicitement définie à "none" pour cacher le lien. La TDM doit utiliser <nowiki>{{{ShowPrevPage}}}</nowiki> comme valeur de paramètre pour en assurer le passage.
+
;ShowPrevPage:set to "block" to show the "previous page" link, set to "none" to hide it. This parameter is not set in the TOC based on this template, but rather in the file containing that TOC. So the parameter value is "passed through" the TOC to this template and therefore '''must explicitly''' be set to none to hide the link. The TOC must use <nowiki>{{{ShowPrevPage}}}</nowiki> as the parameter value to ensure passing along.
<!-- set to "block" to show the "previous page" link, set to "none" to hide it. This parameter is not set in the TOC based on this template, but rather in the file containing that TOC. So the parameter value is "passed through" the TOC to this template and therefore '''must explicitly''' be set to none to hide the link. The TOC must use <nowiki>{{{ShowPrevPage}}}</nowiki> as the parameter value to ensure passing along. -->
+
;PrevPage:the path to the previous page (no surrounding "[")
;PrevPage: Le chemin vers la page précédente (non entouré de "[")
+
;ShowNextPage:set to "block" to show the "next page" link, set to "none" to hide it. This parameter is not set in the TOC based on this template, but rather in the file containing that TOC. So the parameter value is "passed through" the TOC to this template and therefore '''must explicitly''' be set to none to hide the link. The TOC must use <nowiki>{{{ShowNextPage}}}</nowiki> as the parameter value to ensure passing along.
<!-- the path to the previous page (no surrounding "[") -->
+
;NextPage:the path to the previous page (no surrounding "[")
;ShowNextPage:Définir à "block" pour montrer le lien "Page suivante" et à "none" pour le cacher. Ce paramètre n'est pas défini dans la TDM (TDM=Table des matières, TOC=Table of contents) basée sur ce modèle, mais plutôt dans la page contenant cette TDM. La valeur du paramètre est donc "passée à travers" la TDM à ce modèle et doit être explicitement définie à "none" pour cacher le lien. La TDM doit utiliser <nowiki>{{{ShowNextPage}}}</nowiki> comme valeur de paramètre pour en assurer le passage.
+
;bookid:The id for the book (not yet evaluated)
<!-- set to "block" to show the "next page" link, set to "none" to hide it. This parameter is not set in the TOC based on this template, but rather in the file containing that TOC. So the parameter value is "passed through" the TOC to this template and therefore '''must explicitly''' be set to none to hide the link. The TOC must use <nowiki>{{{ShowNextPage}}}</nowiki> as the parameter value to ensure passing along. -->
+
;booktitle:The book title that appears at the top of the TOC in full wiki syntax (i.e. as a link: <nowiki>[[MyGuide|My Great Manual]]</nowiki>
;NextPage: Le chemin vers la page suivante (non entouré de "[")
+
;ShowParttitle:set to "block" to show the part title. This will be used in Sub-TOCs. It will default to hidden when not specified.
<!-- the path to the previous page (no surrounding "[") -->
+
;parttitle:The title of the part that this Sub-TOC covers in full wiki syntax (i.e. as a link: <nowiki>[[MyGuide/MyPart|Part 1: My Great Part]]</nowiki>
;bookid:L' ID(entifiant) du livre (pas encore défini)
+
;toccontent:The content of the TOC as lists and divs.
<!-- The id for the book (not yet evaluated) -->
+
;ShowPrevPart:set to "block" in to show the "previous part" link at the bottom of the TOC. If this parameter is set at the TOC level (and not on the file level like the prev/next page parameter), it will default to hidden when not specified.
;booktitle:Le titre du livre apparaissant en haut de la TDM en syntaxe Wiki complète (par ex. comme un lien <nowiki>[[MonGuide|Mon grand manuel]])</nowiki>
+
;PrevPart:the path to the first page of the previous part (no surrounding "[")
<!-- The book title that appears at the top of the TOC in full wiki syntax (i.e. as a link: <nowiki>[[MyGuide|My Great Manual]]</nowiki> -->
+
;ShowNextPart:set to "block" in to show the "previous part" link at the bottom of the TOC. If this parameter is set at the TOC level (and not on the file level like the prev/next page parameter), it will default to hidden when not specified.
;ShowParttitle: Définir à "block" pour montrer le chapitre ou la partie (part title). Utilisé dans les sous-pages. Par défaut caché quand il n'est pas spécifié.
+
;NextPart:the path to the first page of the next part (no surrounding "[")
<!-- set to "block" to show the part title. This will be used in Sub-TOCs. It will default to hidden when not specified. -->
+
;parttitle: Le titre du chapitre que couvre cette sous-TDM en syntaxe Wiki complète (par ex. comme un lien <nowiki>[[MonGuide/MonChapitre|Partie 1 : Mon grand chapitre]])</nowiki>
+
<!-- The title of the part that this Sub-TOC covers in full wiki syntax (i.e. as a link: <nowiki>[[MyGuide/MyPart|Part 1: My Great Part]]</nowiki> -->
+
;toccontent: Le contenu de la TDM comme listes et "divs" ???
+
:(The content of the TOC as lists and divs.)
+
;ShowPrevPart:Définir à "block" pour montrer le lien "partie précédente" en bas de la TDM. Si ce paramètre est défini au niveau de la TDM (et non au niveau fichier comme le paramètre prev/next), il sera caché par défaut s'il n'est pas défini.
+
<!-- set to "block" in to show the "previous part" link at the bottom of the TOC. If this parameter is set at the TOC level (and not on the file level like the prev/next page parameter), it will default to hidden when not specified. -->
+
;PrevPart:Le chemin de la première page de la partie précédente.
+
<!-- the path to the first page of the previous part (no surrounding "[") -->
+
;ShowNextPart:Définir à "block" pour montrer le lien "partie suivante" en bas de la TDM. Si ce paramètre est défini au niveau de la TDM (et non au niveau fichier comme le paramètre prev/next), il sera caché par défaut s'il n'est pas défini.
+
<!-- set to "block" in to show the "previous part" link at the bottom of the TOC. If this parameter is set at the TOC level (and not on the file level like the prev/next page parameter), it will default to hidden when not specified. -->
+
;NextPart:Le chemin de la première page de la partie suivante. (non entouré de "[")
+
<!-- the path to the first page of the next part (no surrounding "[") -->
+
  
 
{{Documentation/Note|The style classes are not yet created in the css file}}
 
{{Documentation/Note|The style classes are not yet created in the css file}}
  
 +
=== Simulated example ===
  
----
 
'''Bold text'''[[[[Link title]][[[Image:http://www.example.com link title]][[Media:<math>Example.ogg</math>--[[User:PYRATE XCHANGE|PYRATE XCHANGE]] 11:15, 7 June 2008 (CEST)--[[User:PYRATE XCHANGE|PYRATE XCHANGE]] 11:15, 7 June 2008 (CEST)]]]]]=== Simulated example ===
 
 
* '''ShowPrevPage''' set to '''none'''
 
* '''ShowPrevPage''' set to '''none'''
 
* '''ShowNextPage''' set to '''block'''
 
* '''ShowNextPage''' set to '''block'''
Line 80: Line 68:
 
     <div id="toctitle" class="docooo_toctitle" style="background-color: #c5d0e1; border: 0px solid #9099a8; padding: 1px;font-weight: bold; text-align: left; font-size:120%;">[[My Manual]]</div>
 
     <div id="toctitle" class="docooo_toctitle" style="background-color: #c5d0e1; border: 0px solid #9099a8; padding: 1px;font-weight: bold; text-align: left; font-size:120%;">[[My Manual]]</div>
 
     <div id="parttitle" class="docooo_parttitle" style="padding: 1px;font-weight: bold; text-align: left; border-bottom: 1px solid #9099a8; display:block">
 
     <div id="parttitle" class="docooo_parttitle" style="padding: 1px;font-weight: bold; text-align: left; border-bottom: 1px solid #9099a8; display:block">
: [[My First Part]]
+
: [[The First Part]]
 
</div>
 
</div>
 
  <div id="tocfooter" class="docooo_tocfooter" style="padding: 1px;">  
 
  <div id="tocfooter" class="docooo_tocfooter" style="padding: 1px;">  
Line 106: Line 94:
 
</div>
 
</div>
  
===Exemple d'utilisation=== <!--Calculated example-->
+
===Calculated example===
(Note : Inutilisable en mode ''Prévisualiser'' lors de l'édition du modèle) <br>
+
(note: not usable in preview mode while editing this template):
<!-- (note: not usable in preview mode while editing this template): -->
+
 
(Ce code serait à copier tel quel dans la page [[MonGuide]], par exemple. ''Mon manuel'' s'afficherait en bleu après publication...) <br>
+
<pre>{{Documentation/MasterTOC
'''Code :'''
+
<pre>{{FR/Documentation/MasterTOC
+
 
|ShowPrevPage=none
 
|ShowPrevPage=none
|PrevPage=Valeur
 
 
|ShowNextPage=block
 
|ShowNextPage=block
|NextPage=Partie1
+
|NextPage=The Next Page
 
|bookid=1234'''
 
|bookid=1234'''
|booktitle=[[MonGuide|Mon manuel]]
+
|booktitle=[[My Manual]]
 
|ShowParttitle=block
 
|ShowParttitle=block
|parttitle=[[Partie1|Première partie]]
+
|parttitle=[[The First Part]]
 
|ShowPrevPart=none
 
|ShowPrevPart=none
 
|ShowNextPart=block
 
|ShowNextPart=block
|NextPart=Partie2
+
|NextPart=The Second Part
|toccontent=* [[Page1|Introduction]]
+
|toccontent=* Chapter
* [[Page2|Environnement]]
+
* Chapter
* [[Page3|Précautions]]
+
* Chapter
 
}}
 
}}
 
</pre>
 
</pre>
  
'''Affichage :''' (comparez les adresses réelles ou liens - par survol de la souris - et les [http://meta.wikimedia.org/wiki/Aide:Lien_redirigé liens redirigés] (affichés en rouge si la cible / le lien n'existe pas). Ce code d'appel au modèle est a recopier sur chaque page, en éditant les paramètres pour finalement relier entre elles toutes les pages de ce qui pourra véritablement devenir un gros livre...)
+
will be:
  
 
<div style="border: 1px dotted #000; padding: 20px; width: 400px; height: 200px; margin: 20px;">
 
<div style="border: 1px dotted #000; padding: 20px; width: 400px; height: 200px; margin: 20px;">
  
{{FR/Documentation/MasterTOC
+
{{Documentation/MasterTOC
 
|ShowPrevPage=none
 
|ShowPrevPage=none
|PrevPage=Valeur
 
 
|ShowNextPage=block
 
|ShowNextPage=block
|NextPage=Partie1
+
|NextPage=The Next Page
 
|bookid=1234'''
 
|bookid=1234'''
|booktitle=[[MonGuide|Mon manuel]]
+
|booktitle=[[My Manual]]
 
|ShowParttitle=block
 
|ShowParttitle=block
|parttitle=[[Partie1|Première partie]]
+
|parttitle=[[The First Part]]
 
|ShowPrevPart=none
 
|ShowPrevPart=none
 
|ShowNextPart=block
 
|ShowNextPart=block
|NextPart=Partie2
+
|NextPart=The Second Part
|toccontent=* [[Page1|Introduction]]
+
|toccontent=* Chapter
* [[Page2|Environnement]]
+
* Chapter
* [[Page3|Précautions]]
+
* Chapter
 
}}
 
}}
 
</div>
 
</div>
 
; Exemples d'utilisation de ce modèle :
 
* [[FR/Documentation/Writer_Guide | Guide pour Writer version 3]]
 
* [[FR/Documentation/Administration_Guide | Guide d'administration]]
 
* [[FR/Documentation/BASIC_Guide | Guide Basic]]
 
 
Voir aussi le modèle anglophone (''Next page'' au lieu de ''Page suivante'') [[Template:Documentation/BASICGuideTOC/v2]]
 
 
 
</noinclude>
 
</noinclude>
 
<noinclude>[[Category:FR/Modeles_Wiki|TdM]]</noinclude>
 

Revision as of 10:59, 20 July 2009

{{{booktitle}}}

{{{toccontent}}}

[[{{{PrevPage}}}|< Indietro]] [[{{{NextPage}}}|Avanti >]]


Usage of Parameters

ShowPrevPage
set to "block" to show the "previous page" link, set to "none" to hide it. This parameter is not set in the TOC based on this template, but rather in the file containing that TOC. So the parameter value is "passed through" the TOC to this template and therefore must explicitly be set to none to hide the link. The TOC must use {{{ShowPrevPage}}} as the parameter value to ensure passing along.
PrevPage
the path to the previous page (no surrounding "[")
ShowNextPage
set to "block" to show the "next page" link, set to "none" to hide it. This parameter is not set in the TOC based on this template, but rather in the file containing that TOC. So the parameter value is "passed through" the TOC to this template and therefore must explicitly be set to none to hide the link. The TOC must use {{{ShowNextPage}}} as the parameter value to ensure passing along.
NextPage
the path to the previous page (no surrounding "[")
bookid
The id for the book (not yet evaluated)
booktitle
The book title that appears at the top of the TOC in full wiki syntax (i.e. as a link: [[MyGuide|My Great Manual]]
ShowParttitle
set to "block" to show the part title. This will be used in Sub-TOCs. It will default to hidden when not specified.
parttitle
The title of the part that this Sub-TOC covers in full wiki syntax (i.e. as a link: [[MyGuide/MyPart|Part 1: My Great Part]]
toccontent
The content of the TOC as lists and divs.
ShowPrevPart
set to "block" in to show the "previous part" link at the bottom of the TOC. If this parameter is set at the TOC level (and not on the file level like the prev/next page parameter), it will default to hidden when not specified.
PrevPart
the path to the first page of the previous part (no surrounding "[")
ShowNextPart
set to "block" in to show the "previous part" link at the bottom of the TOC. If this parameter is set at the TOC level (and not on the file level like the prev/next page parameter), it will default to hidden when not specified.
NextPart
the path to the first page of the next part (no surrounding "[")

Template:Documentation/Note

Simulated example

  • ShowPrevPage set to none
  • ShowNextPage set to block
  • NextPage set to The Next Page
  • bookid set to 1234
  • booktitle set to [[My Manual]]
  • ShowParttitle set to block
  • parttitle set to [[The First Part]]
  • ShowPrevPart set to none
  • ShowNextPart set to block
  • NextPart set to The Second Part
  • toccontent set to * Chapter
    * Chapter
    * Chapter
Book.png
[[{{{PrevPart}}}|< Previous Part]] Next Part >
  • Chapter
  • Chapter
  • Chapter
[[{{{PrevPage}}}|< Previous Page]] Next Page >

Calculated example

(note: not usable in preview mode while editing this template):

{{Documentation/MasterTOC
|ShowPrevPage=none
|ShowNextPage=block
|NextPage=The Next Page
|bookid=1234'''
|booktitle=[[My Manual]]
|ShowParttitle=block
|parttitle=[[The First Part]]
|ShowPrevPart=none
|ShowNextPart=block
|NextPart=The Second Part
|toccontent=* Chapter
* Chapter
* Chapter
}}

will be:

The First Part
[[{{{PrevPart}}}|< Previous Section

]]

Next Section >
  • Chapter
  • Chapter
  • Chapter
[[{{{PrevPage}}}|< Previous Page

]]

Next Page >


Personal tools