Difference between revisions of "Template:IT/Documentation/MasterTOC"
From Apache OpenOffice Wiki
Sseminario (Talk | contribs) ((checkpoint save)) |
(+cat) |
||
(11 intermediate revisions by one other user not shown) | |||
Line 10: | Line 10: | ||
{|border=0 width=100% | {|border=0 width=100% | ||
|- | |- | ||
− | |style="text-align:left;"|<span style="display: {{{ShowPrevPart|none}}}">[[{{{PrevPart}}}|< | + | |style="text-align:left;"|<span style="display: {{{ShowPrevPart|none}}}">[[{{{PrevPart}}}|< Sezione precedente]]</span> |
− | |style="text-align:right;"|<span style="display: {{{ShowNextPart|none}}}">[[{{{NextPart}}}| | + | |style="text-align:right;"|<span style="display: {{{ShowNextPart|none}}}">[[{{{NextPart}}}|Sezione successiva >]]</span> |
|} | |} | ||
</div> | </div> | ||
Line 21: | Line 21: | ||
{|border=0 width=100% | {|border=0 width=100% | ||
|- | |- | ||
− | |style="text-align:left;"|<span style="display: {{{ShowPrevPage|none}}}">[[{{{PrevPage}}}|< Indietro]]</span> | + | |style="text-align:left;"|<span style="display: {{{ShowPrevPage|none}}}">[[IT/{{{PrevPage}}}|< Indietro]]</span> |
− | |style="text-align:right;"|<span style="display: {{{ShowNextPage|none}}}">[[{{{NextPage}}}|Avanti >]]</span> | + | |style="text-align:right;"|<span style="display: {{{ShowNextPage|none}}}">[[IT/{{{NextPage}}}|Avanti >]]</span> |
|} | |} | ||
</div> | </div> | ||
Line 73: | Line 73: | ||
{|border=0 width=100% | {|border=0 width=100% | ||
|- | |- | ||
− | |style="text-align:left;"|<span style="display: {{{ShowPrevPart|none}}}">[[{{{PrevPart}}}|< | + | |style="text-align:left;"|<span style="display: {{{ShowPrevPart|none}}}">[[{{{PrevPart}}}|< Sezione precedente]]</span> |
− | |style="text-align:right;"|<span style="display: block">[[ | + | |style="text-align:right;"|<span style="display: block">[[Seconda parte|Sezione successiva >]]</span> |
|} | |} | ||
</div> | </div> | ||
<div id="tocbody" class="docooo_tocbody" style="padding: 6px;"> | <div id="tocbody" class="docooo_tocbody" style="padding: 6px;"> | ||
− | * | + | * Capitolo |
− | * | + | * Capitolo |
− | * | + | * Capitolo |
</div> | </div> | ||
<div id="PrevNextPage" class="docooo_prevnextpage" style="font-size: small; margin-bottom: 10px;"> | <div id="PrevNextPage" class="docooo_prevnextpage" style="font-size: small; margin-bottom: 10px;"> | ||
{|border=0 width=100% | {|border=0 width=100% | ||
|- | |- | ||
− | |style="text-align:left;"|<span style="display: none">[[{{{PrevPage}}}|< | + | |style="text-align:left;"|<span style="display: none">[[{{{PrevPage}}}|< Indietro]]</span> |
− | |style="text-align:right;"|<span style="display: block">[[ | + | |style="text-align:right;"|<span style="display: block">[[Pagina successiva|Avanti >]]</span> |
|} | |} | ||
</div> | </div> | ||
Line 100: | Line 100: | ||
|ShowPrevPage=none | |ShowPrevPage=none | ||
|ShowNextPage=block | |ShowNextPage=block | ||
− | |NextPage= | + | |NextPage=Pagina successiva |
|bookid=1234''' | |bookid=1234''' | ||
− | |booktitle=[[ | + | |booktitle=[[Guida]] |
|ShowParttitle=block | |ShowParttitle=block | ||
− | |parttitle=[[ | + | |parttitle=[[Prima parte]] |
|ShowPrevPart=none | |ShowPrevPart=none | ||
|ShowNextPart=block | |ShowNextPart=block | ||
− | |NextPart= | + | |NextPart=Seconda parte |
− | |toccontent=* | + | |toccontent=* Capitolo |
− | * | + | * Capitolo |
− | * | + | * Capitolo |
}} | }} | ||
</pre> | </pre> | ||
Line 123: | Line 123: | ||
|NextPage=The Next Page | |NextPage=The Next Page | ||
|bookid=1234''' | |bookid=1234''' | ||
− | |booktitle=[[ | + | |booktitle=[[Guida]] |
|ShowParttitle=block | |ShowParttitle=block | ||
− | |parttitle=[[ | + | |parttitle=[[Prima parte]] |
|ShowPrevPart=none | |ShowPrevPart=none | ||
|ShowNextPart=block | |ShowNextPart=block | ||
− | |NextPart= | + | |NextPart=Seconda parte |
− | |toccontent=* | + | |toccontent=* Capitolo |
− | * | + | * Capitolo |
− | * | + | * Capitolo |
}} | }} | ||
</div> | </div> | ||
+ | [[Category:IT]] | ||
</noinclude> | </noinclude> |
Latest revision as of 19:32, 20 January 2012
{{{booktitle}}}
{{{toccontent}}}
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:IT/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
Calculated example
(note: not usable in preview mode while editing this template):
{{IT/Documentation/MasterTOC |ShowPrevPage=none |ShowNextPage=block |NextPage=Pagina successiva |bookid=1234''' |booktitle=[[Guida]] |ShowParttitle=block |parttitle=[[Prima parte]] |ShowPrevPart=none |ShowNextPart=block |NextPart=Seconda parte |toccontent=* Capitolo * Capitolo * Capitolo }}
will be: