Template:Book

From open-support.info

(Difference between revisions)
Jump to: navigation, search
m
m (Variable version)
Line 1: Line 1:
-
<includeonly>{{book/core1
+
<includeonly>{{#vardefine:root|{{#titleparts:{{FULLPAGENAME}}|1}}
-
|root = {{#titleparts:{{FULLPAGENAME}}|1}}
+
}}{{#vardefine:path|{{#if:{{#titleparts:{{PAGENAME}}|-1}}|{{#titleparts:{{PAGENAME}}||2}}}}
-
|path = {{#if:{{#titleparts:{{PAGENAME}}|-1}}|{{#titleparts:{{PAGENAME}}||2}}}}
+
}}{{#if:{{#var:path}}
-
|master page = {{{master page|}}}
+
|{{#vardefine:main|{{#if:{{{master page|}}}
-
|master rev  = {{{master rev|}}}
+
  |{{{master page}}}
-
|status   = {{{status|}}}
+
  |{{#if:{{#show:{{#var:root}}|?docinfo master page#}}
-
|progress = {{{progress|}}}
+
  |{{#show:{{#var:root}}|?docinfo master page#}}/{{#var:path}}
-
|priority = {{{priority|}}}
+
  }}
-
|category = {{{category|}}}
+
  }}
-
|author   = {{{author|}}}
+
}}{{#vardefine:stat|{{#if:{{{status|}}}  |{{{status}}}  |{{#show:{{#var:root}}|?docinfo status}}}}
-
|editor   = {{{editor|}}}
+
}}{{#vardefine:prog|{{#if:{{{progress|}}}|{{{progress}}}|{{#show:{{#var:root}}|?docinfo progress}}}}
-
|support = {{{support|}}}
+
}}{{#vardefine:prio|{{#if:{{{priority|}}}|{{{priority}}}|{{#show:{{#var:root}}|?docinfo priority}}}}
-
|lang     = {{{lang|}}}
+
}}{{#vardefine:cate|{{#if:{{{category|}}}|{{{category}}}|{{#show:{{#var:root}}|format=list|?docinfo category#}}}}
-
|desc    = {{{desc|}}}
+
}}{{#vardefine:auth|{{#if:{{{author|}}}  |{{{author}}}  |{{#show:{{#var:root}}|format=list|?docinfo author#}}}}
-
|heading = {{{heading|}}}
+
}}{{#vardefine:edit|{{#if:{{{editor|}}}  |{{{editor}}}  |{{#show:{{#var:root}}|format=list|?docinfo editor#}}}}
-
|title   = {{{title|}}}
+
}}{{#vardefine:supp|{{#if:{{{support|}}} |{{{support}}} |{{#show:{{#var:root}}|format=list|?docinfo support#}}}}
-
|next     = {{{next|}}}
+
}}{{#vardefine:lang|{{#if:{{{lang|}}}    |{{{lang}}}    |{{#show:{{{root}}}|?docinfo language}}}}
-
|prev = {{#ask:
+
}}
 +
|{{#vardefine:main{{{master page|}}}
 +
}}{{#vardefine:stat|{{{status|}}}
 +
  }}{{#vardefine:prog|{{{progress|}}}
 +
}}{{#vardefine:prio|{{{priority|}}}
 +
}}{{#vardefine:cate|{{{category|}}}
 +
}}{{#vardefine:auth|{{{author|}}}
 +
}}{{#vardefine:edit|{{{editor|}}}
 +
}}{{#vardefine:supp|{{{support|}}}
 +
}}{{#vardefine:lang|{{{lang|}}}
 +
}}
 +
}}{{#if:{{#var:main}}
 +
|{{  #vardefine:mrev|{{{master rev|}}}
 +
}}{{#vardefine:head|{{#if:{{{heading|}}}|{{{heading}}}|{{#show:{{{master page}}}|?book heading}}}}
 +
}}{{#vardefine:titl|{{#if:{{{title|}}}  |{{{title}}}  |{{#show:{{{master page}}}|?book title}}}}
 +
}}{{#vardefine:next|{{#if:{{{next|}}}  |{{{next}}}  |{{#show:{{{master page}}}|?book next}}}}
 +
}}{{#vardefine:desc|{{#if:{{{desc|}}}  |{{{desc}}}  |{{#show:{{{master page}}}|?description}}}}
 +
}}
 +
|{{  #vardefine:head|{{{heading|}}}
 +
}}{{#vardefine:titl|{{{title|}}}
 +
}}{{#vardefine:next|{{{next|}}}
 +
}}{{#vardefine:desc|{{{desc|}}}
 +
}}
 +
}}{{#vardefine:prev|{{#ask:
  [[Category:Books]]
  [[Category:Books]]
  [[book chain::{{FULLPAGENAME}}]]
  [[book chain::{{FULLPAGENAME}}]]
Line 23: Line 46:
  |link = none
  |link = none
  }}
  }}
-
}}</includeonly><noinclude>
+
}}<!-- HEADER NAFVIGATION -->
 +
<div id="bookHeaderNavSrc" style="display:none">
 +
<span class="subpage" style="float:right">{{#if:{{#var:prev}}
 +
|{{Book/Link|{{#var:prev}}|{{message|Prev|dict=nav|nocat}}}} &#124;&nbsp;
 +
}}{{#if:{{#titleparts:{{PAGENAME}}|-1}}
 +
|{{Book/Link|..|{{message|Up|dict=nav|nocat}}}} &#124;&nbsp;
 +
}}{{#if:{{#var:next}}
 +
|{{Book/Link|{{#rel2abs:{{#var:next}}|{{FULLPAGENAME}}}}|{{message|Next|dict=nav|nocat}}}}
 +
}}</span>
 +
</div>
 +
<!-- FOOTER NAVIGATION -->
 +
<div id="bookFooterNavSrc" style="display:none">
 +
<div id="bookFooterMargin"><br /></div>
 +
{| style="width:100%;font-size:85%;line-height:85%;margin:1em 0px 0px 0px;padding:0px;white-space:nowrap"
 +
|style="width:35%;vertical-align:bottom;text-align:left"  |<span class="subpages">{{Book/Link
 +
|{{#var:prev}}
 +
|{{message|Prev|dict=nav|nocat}}
 +
}}</span>
 +
|style="width:30%;vertical-align:bottom;text-align:center"|<span class="subpages">{{Book/Link
 +
|..
 +
|{{message|Up|dict=nav|nocat}}
 +
}}</span>
 +
|style="width:35%;vertical-align:bottom;text-align:right" |<span class="subpages">{{#if:{{#var:next}}
 +
|{{Book/Link
 +
  |{{#rel2abs:{{#var:next}}|{{FULLPAGENAME}}}}
 +
  |{{message|Next|dict=nav|nocat}}
 +
  }}
 +
}}</span>
 +
|-
 +
|style="width:35%;vertical-align:bottom;text-align:left"  |<span class="subpages">{{Book/Link
 +
|{{#var:prev}}
 +
}}</span>
 +
|style="width:30%;vertical-align:bottom;text-align:center"|<span class="subpages">{{Book/Link
 +
|{{#var:root}}
 +
}}</span>
 +
|style="width:35%;vertical-align:bottom;text-align:right" |<span class="subpages">{{#if:{{#var:next}}
 +
|{{Book/Link
 +
  |{{#rel2abs:{{#var:next}}|{{FULLPAGENAME}}}}
 +
  }}
 +
}}</span>
 +
|}
 +
{{languages|{{#var:main}}}}
 +
</div>
 +
{{DISPLAYTITLE:{{#if:{{#var:head}}
 +
|{{#var:head}}&nbsp;
 +
}}{{#var:titl}}
 +
}}{{docinfo
 +
|master page = {{#var:main}}
 +
|master rev  = {{#var:master rev}}
 +
|status      = {{#var:stat}}
 +
|progress    = {{#var:prog}}
 +
|priority    = {{#var:prio}}
 +
|category    = {{#var:cate}}
 +
|author      = {{#var:auth}}
 +
|editor      = {{#var:edit}}
 +
|support    = {{#var:supp}}
 +
|lang        = {{#var:lang}}
 +
|desc        = {{#var:desc}}
 +
}}{{#if:{{#var:head}}|{{#set:book heading={{#var:head}}}}
 +
}}{{#if:{{#var:titl}}|{{#set:book title  ={{#var:titl}}}}
 +
}}{{#if:{{#var:next}}|{{#set:
 +
|book next  ={{#var:next}}
 +
|book chain ={{#rel2abs:{{#var:next}}|{{FULLPAGENAME}}}}
 +
}}
 +
}}[[Category:Books|{{PAGENAME}}]]</includeonly><noinclude>
{{documentation includeonly}}
{{documentation includeonly}}
{{documentation}}
{{documentation}}
</noinclude>
</noinclude>

Revision as of 07:08, 20 April 2011

The results of this template are not shown here.

[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.

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox