Difference between revisions of "Template:UseTOC/9.2"

From PC-BSD Wiki
Jump to: navigation, search
 
(10 intermediate revisions by one user not shown)
Line 1: Line 1:
 
{{
 
{{
 
{{#switch: {{{1}}}
 
{{#switch: {{{1}}}
 +
|test = findSection
 
|toc
 
|toc
 
|Toc
 
|Toc
Line 7: Line 8:
 
|Nav
 
|Nav
 
|NAV  = NavHeader<!-- because of template expansion limits, means 6 UseTOC invocations on the flat_html page -->
 
|NAV  = NavHeader<!-- because of template expansion limits, means 6 UseTOC invocations on the flat_html page -->
|flat1 = makeFlat1
+
|sub
|flat2 = makeFlat2
+
|Sub
|flat3 = makeFlat3
+
|SUB  = sectionTopics
|flat4 = makeFlat4
+
|flat5 = makeFlat5
+
|flat6 = makeFlat6
+
 
|null
 
|null
 
}}
 
}}
|title={{{title|}}}<!-- ########## DO NOT MODIFY anything above this line ######### -->
+
|title={{{title|}}}|<!-- ########## DO NOT MODIFY anything above this line ######### -->
|0|Preface|
+
0|Preface|
 
1.|Introduction|
 
1.|Introduction|
 
1.1|Goals and Features|
 
1.1|Goals and Features|
Line 130: Line 128:
 
}}
 
}}
 
<noinclude>
 
<noinclude>
{| class="noprint" align="left" style="margin-left:-7px; margin-right:20px; margin-top:2px; margin-bottom:1px"
+
{{:template:UseTOC}}
|
+
|-
+
|__FORCETOC__
+
| __TOC__
+
|}
+
== Description ==
+
{{note|class=rightfloat|width=35%|icon64=Translators should localize the following templates used:
+
:* {{translate-me-link|template:Word-previous|txt=Word-previous}}
+
:* {{translate-me-link|template:Word-next|txt=Word-next}},
+
:* {{translate-me-link|template:Phrase-return to table of contents|txt=Phrase-return to table of contents}}, and
+
:* {{translate-me-link|template:Phrase-table of contents|txt=Phrase-table of contents}} }}
+
This damn spiffy template enables a centralized '''Handbook ''Table of Contents''''' which can be used in multiple ways.  It calls an entirely automagical NavHeader template which uses the chronological relationship in the page names within the UseTOC template to choose the ''back'' and ''forward'' links.  The same ordered list provides the Table Of Contents page links and provides for the flat_html page. It necessarily works within the versioned page system, which means that this template will need to be duplicated for future versions.
+
 
+
== Usage ==
+
'''<nowiki>{{UseTOC{{</nowiki>putVers}}|Nav}}''' invokes the NavHeader as below:<br/>
+
{| class="navheader noprint screen"
+
|class="navleft"|{{NavHeaderLeft|{{{back}}}{{putLang}}|{{{forward}}}{{putLang}}|{{#if:{{{l7dBack|}}}|{{{l7dBack}}}|{{{back}}}}}|{{#if:{{{l7dForward|}}}|{{{l7dForward}}}|{{{forward}}}}}}}
+
|class="navheaderbuffer"|
+
|class="navmiddle"|{{NavHeaderMiddle}}
+
|class="navheaderbuffer"|
+
|class="navright"|{{NavHeaderRight|{{{back}}}{{putLang}}|{{{forward}}}{{putLang}}|{{#if:{{{l7dBack|}}}|{{{l7dBack}}}|{{{back}}}}}|{{#if:{{{l7dForward|}}}|{{{l7dForward}}}|{{{forward}}}}}}}
+
|-
+
|style="border-bottom: #aaaaaa solid 1px; height: 40px;" colspan=5|<span target="{{PAGENAME}}"; id="{{PAGENAME}}"; style="margin-left:0; margin-right:0; width:100%; font-size: 200%; line-height: 1.2em; margin-bottom: 0em;">{{#if: {{getLang}}|{{:Translations:{{#titleparts: {{PAGENAME}}|1|1}}/Page display title/{{getLang}}}}|{{#titleparts: {{{custompagename|{{PAGENAME}}}}}|1}}}}</span>
+
|}
+
But if the pages relating to the backward (left) or forward (right) icon/links are not yet defined by their translation, then the result is below:<br/>
+
{{UseTOC{{putVers}}|Nav}}
+
'''<nowiki>{{UseTOC{{putVers}}</nowiki>|Toc}}''' invokes a list of Table Of Contents links similar to below:<br/>
+
{{hierB|title=Preface}}<br/>
+
{{hierB|1.|title=Introduction}}
+
{{hier|1.1|title=Goals and Features}}
+
{{hier|1.2|title=What's New|alt=What's New in {{getVers}}}}
+
{{hier|1.3|title=PC-BSD® Releases}}
+
{{hier|1.4|title=PC-BSD® for Linux Users}}
+
'''<nowiki>{{UseTOC{{putVers}}</nowiki>|flat}}''' causes the {{local|link=flat_html}} page output.
+
 
</noinclude>
 
</noinclude>

Latest revision as of 14:18, 30 December 2013


Contents

[edit] Description

NOTE: Translators should localize the following templates used:

This damn spiffy template enables a centralized Handbook Table of Contents which can be used in multiple ways. It calls an entirely automagical NavHeader template which uses the chronological relationship in the page names within the UseTOC template to choose the back and forward links. The same ordered list provides the Table Of Contents page links and provides for the flat_html page (although wiki page limits prevent this). It necessarily works within the versioned page system, which means that this template will need to be duplicated for each of the future versions.

[edit] Usage

[edit] Navigation

{{UseTOC{{putVers}}|Nav}} invokes the NavHeader output similar to below:

But if the pages relating to the backward (left) or forward (right) icon/links are not yet defined by their translation, or if the page is not yet or no longer in the Table Of Contents then the result is as below:

(Sorry for the inconvenience)

[edit] Table Of Contents

{{UseTOC{{putVers}}|Toc}} invokes a formatted list of page links similar to below:
Preface
1. Introduction

1.1 Goals and Features
1.2 What's New in 9.2
1.3 PC-BSD® Releases
1.4 PC-BSD® for Linux Users

[edit] Flat HTML

{{UseTOC{{putVers}}|flat}} causes the flat_html page output (but is limited by page size which makes it incomplete/broken in actual use).

[edit] Modification

How to insert new pages into the Table Of Contents
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox