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

From Apache OpenOffice Wiki
Jump to: navigation, search
 
(2 intermediate revisions by 2 users not shown)
Line 19: Line 19:
 
{|border=0 width=100%
 
{|border=0 width=100%
 
|-
 
|-
|style="text-align:left;"|<span style="display: {{{ShowPrevPage|none}}}">[[{{{PrevPage}}}|&lt; Zh Previous Page]]</span>
+
|style="text-align:left;"|<span style="display: {{{ShowPrevPage|none}}}">[[{{{PrevPage}}}|&lt; 上一页]]</span>
|style="text-align:right;"|<span style="display: {{{ShowNextPage|none}}}">[[{{{NextPage}}}|Next Page &gt;]]</span>
+
|style="text-align:right;"|<span style="display: {{{ShowNextPage|none}}}">[[{{{NextPage}}}|下一页 &gt;]]</span>
 
|}
 
|}
 
</div>
 
</div>
Line 43: Line 43:
 
;NextPart:the path to the first page of the next part (no surrounding "[")
 
;NextPart: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}}
+
{{Note|The style classes are not yet created in the css file}}
  
  
Line 72: Line 72:
 
{|border=0 width=100%
 
{|border=0 width=100%
 
|-
 
|-
|style="text-align:left;"|<span style="display: {{{ShowPrevPart|none}}}">[[{{{PrevPart}}}|&lt; Previous Part]]</span>
+
|style="text-align:left;"|<span style="display: {{{ShowPrevPart|none}}}">[[{{{PrevPart}}}|&lt; 上一部分]]</span>
|style="text-align:right;"|<span style="display: block">[[The Second Part|Next Part &gt;]]</span>
+
|style="text-align:right;"|<span style="display: block">[[The Second Part|下一部分 &gt;]]</span>
 
|}
 
|}
 
</div>
 
</div>
Line 133: Line 133:
 
}}
 
}}
 
</div>
 
</div>
</noinclude>
+
[[Category:ZH-TW/Documentation]]</noinclude>

Latest revision as of 13:28, 6 July 2018

Book.png
{{{booktitle}}}

{{{toccontent}}}

[[{{{PrevPage}}}|< 上一页]] [[{{{NextPage}}}|下一页 >]]


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 "[")
Documentation note.png The style classes are not yet created in the css file



Bold text[[Link title[[[Image:http://www.example.com link title]][[Media:--PYRATE XCHANGE 11:15, 7 June 2008 (CEST)--PYRATE XCHANGE 11:15, 7 June 2008 (CEST)]]]]]=== 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}}}|< 上一部分]] 下一部分 >
  • Chapter
  • Chapter
  • Chapter
[[{{{PrevPage}}}|< Previous Page]] Next Page >

Calculated example

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

{{ZH/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:

Book.png
The First Part
[[{{{PrevPart}}}|< Previous Section]] Next Section >
  • Chapter
  • Chapter
  • Chapter
[[{{{PrevPage}}}|< 上一页]] 下一页 >


Personal tools