Template:Book

From open-support.info

(Difference between revisions)
Jump to: navigation, search
m
m
 
(14 intermediate revisions not shown)
Line 1: Line 1:
-
<includeonly>{{#vardefine:root|{{#titleparts:{{FULLPAGENAME}}|1}}
+
{{Documentation
 +
|desc=A semantic template to manage a set of sequential pages like a traditional "Book".
 +
|author=Dick6809
 +
}}
 +
<onlyinclude><includeonly>{{#vardefine:root|{{#titleparts:{{FULLPAGENAME}}|1}}
}}{{#vardefine:path|{{#if:{{#titleparts:{{PAGENAME}}|-1}}|{{#titleparts:{{PAGENAME}}||2}}}}
}}{{#vardefine:path|{{#if:{{#titleparts:{{PAGENAME}}|-1}}|{{#titleparts:{{PAGENAME}}||2}}}}
}}{{#vardefine:main|{{#if:{{{master page|}}}
}}{{#vardefine:main|{{#if:{{{master page|}}}
Line 53: Line 57:
<div id="bookHeaderNavSrc" style="display:none">
<div id="bookHeaderNavSrc" style="display:none">
<span class="subpage" style="float:right">{{#if:{{#var:prev}}
<span class="subpage" style="float:right">{{#if:{{#var:prev}}
-
|{{Book/Link|{{#var:prev}}|&lt;&nbsp;{{message|Prev|dict=nav|nocat}}}} &#124;&nbsp;
+
|{{Book/Link|{{#var:prev}}|{{message|Prev|dict=nav|nocat}}}} &#124;&nbsp;
}}{{#if:{{#titleparts:{{PAGENAME}}|-1}}
}}{{#if:{{#titleparts:{{PAGENAME}}|-1}}
|{{Book/Link|..|{{message|Up|dict=nav|nocat}}}} &#124;&nbsp;
|{{Book/Link|..|{{message|Up|dict=nav|nocat}}}} &#124;&nbsp;
}}{{#if:{{#var:next}}
}}{{#if:{{#var:next}}
-
|{{Book/Link|{{#var:next}}|{{message|Next|dict=nav|nocat}}&nbsp;&gt;}}
+
|{{Book/Link|{{#var:next}}|{{message|Next|dict=nav|nocat}}}}
}}</span>
}}</span>
</div>
</div>
Line 65: Line 69:
{| style="width:100%;<!--
{| style="width:100%;<!--
       --> font-size:85%;<!--
       --> font-size:85%;<!--
-
       --> line-height:85%;<!--
+
       --> line-height:100%;<!--
       --> margin:1em 0px 0px 0px;<!--
       --> margin:1em 0px 0px 0px;<!--
       --> padding:0px; <!--
       --> padding:0px; <!--
-
       --> white-space:nowrap;"
+
       --> white-space:nowrap;<!--
-
|style="width:35%;vertical-align:bottom;text-align:left" |<span class="subpages">{{Book/Link
+
      -->"  
 +
|style="vertical-align:bottom;<!--
 +
    --> text-align:left;<!--
 +
    -->"|<span class="subpages">{{Book/Link
  |{{#var:prev}}
  |{{#var:prev}}
  |&lt;&nbsp;{{message|Prev|dict=nav|nocat}}
  |&lt;&nbsp;{{message|Prev|dict=nav|nocat}}
  }}</span>
  }}</span>
-
|style="width:30%;vertical-align:bottom;text-align:center"|<span class="subpages">{{Book/Link
+
|style="vertical-align:bottom;<!--
 +
    --> text-align:center;<!--
 +
    -->"|<span class="subpages">{{Book/Link
  |..
  |..
  |{{message|Up|dict=nav|nocat}}
  |{{message|Up|dict=nav|nocat}}
  }}</span>
  }}</span>
-
|style="width:35%;vertical-align:bottom;text-align:right" |<span class="subpages">{{#if:{{#var:next}}
+
|style="vertical-align:bottom;<!--
-
|{{Book/Link
+
    --> text-align:right;<!--
-
  |{{#rel2abs:{{#var:next}}|{{FULLPAGENAME}}}}
+
    -->"|<span class="subpages">{{Book/Link
-
  |{{message|Next|dict=nav|nocat}}&nbsp;&gt;
+
|{{#var:next}}
-
  }}
+
|{{message|Next|dict=nav|nocat}}&nbsp;&gt;
  }}</span>
  }}</span>
|-
|-
-
|style="width:50%;<!--
+
|style="width:40%;<!--
     --> vertical-align:bottom;<!--
     --> vertical-align:bottom;<!--
     --> text-align:left;<!--
     --> text-align:left;<!--
     --> white-space:nowrap;<!--
     --> white-space:nowrap;<!--
-
     -->"|<span class="subpages">{{Book/Link
+
     -->"|<span class="subpages">{{Book/Link|{{#var:prev}}|show=all}}</span>
-
|{{#var:prev}}
+
|style="width:20%;<!--
-
|show=all
+
-
}}</span>
+
-
|style="width:auto;<!--
+
     --> vertical-align:bottom;<!--
     --> vertical-align:bottom;<!--
     --> text-align:center;<!--
     --> text-align:center;<!--
     --> white-space:nowrap;<!--
     --> white-space:nowrap;<!--
-
     -->"|<span class="subpages">{{Book/Link
+
     -->"|<span class="subpages">{{Book/Link|{{#var:root}}|show=all}}</span>
-
|{{#var:root}}
+
|style="width:40%;<!--
-
}}</span>
+
-
|style="width:50%;<!--
+
     --> vertical-align:bottom;<!--
     --> vertical-align:bottom;<!--
     --> text-align:right;<!--
     --> text-align:right;<!--
     --> white-space:nowrap;<!--
     --> white-space:nowrap;<!--
-
     -->"|<span class="subpages">{{Book/Link
+
     -->"|<span class="subpages">{{Book/Link|{{#var:next}}|show=all}}</span>
-
|{{#var:next}}
+
-
|show=all
+
-
}}</span>
+
|}
|}
{{languages|{{#var:main}}}}
{{languages|{{#var:main}}}}
 +
{{documentation debug}}
</div>
</div>
{{DISPLAYTITLE:{{#if:{{#var:head}}|{{#var:head}}&nbsp;}}{{#var:titl}}
{{DISPLAYTITLE:{{#if:{{#var:head}}|{{#var:head}}&nbsp;}}{{#var:titl}}
Line 127: Line 129:
}}{{#if:{{#var:next}}|{{#set:
}}{{#if:{{#var:next}}|{{#set:
  |book next  ={{#var:next}}
  |book next  ={{#var:next}}
-
  |book chain ={{#rel2abs:{{#var:next}}|{{FULLPAGENAME}}}}
+
  |book chain ={{#rel2abs:{{#replace:{{#var:next}}|~|{{#var:root}}}}|{{FULLPAGENAME}}}}
  }}
  }}
}}[[Category:Books|{{PAGENAME}}]]</includeonly><noinclude>
}}[[Category:Books|{{PAGENAME}}]]</includeonly><noinclude>
{{documentation includeonly}}
{{documentation includeonly}}
-
{{documentation}}
+
</noinclude></onlyinclude>
-
</noinclude>
+

Latest revision as of 12:49, 29 April 2011

[edit] [purge] Template documentation

Template:Book – a semantic template to manage a set of sequential pages like a traditional "Book". This is the "Book" template. It should be called in the following format:

{{Book
|1=
|2=
|3=
}}

Edit the page to see the template text.

The results of this template are not shown here.


Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox