Template:Book

From open-support.info

(Difference between revisions)
Jump to: navigation, search
m
m
 
(50 intermediate revisions not shown)
Line 1: Line 1:
-
<includeonly>{{#if:{{{root|}}}
+
{{Documentation
-
|{{book/core
+
|desc=A semantic template to manage a set of sequential pages like a traditional "Book".
-
|master page= {{#if:{{{master page|}}}
+
|author=Dick6809
-
  |{{{master page}}}
+
}}
-
  |{{#show:{{{root}}}|?docinfo master page}}/{{#titleparts:{{PAGENAME}}|-1|2}}
+
<onlyinclude><includeonly>{{#vardefine:root|{{#titleparts:{{FULLPAGENAME}}|1}}
-
  }}
+
}}{{#vardefine:path|{{#if:{{#titleparts:{{PAGENAME}}|-1}}|{{#titleparts:{{PAGENAME}}||2}}}}
-
|master rev = {{{master rev|}}}
+
}}{{#vardefine:main|{{#if:{{{master page|}}}
-
|status    = {{#if:{{{status|}}}  |{{{status}}}  |{{#show:{{{root}}}|?docinfo status}}}}
+
  |{{{master page}}}
-
|progress  = {{#if:{{{progress|}}}|{{{progress}}}|{{#show:{{{root}}}|?docinfo progress}}}}
+
  |{{#if:{{#var:path}}
-
|priority  = {{#if:{{{priority|}}}|{{{priority}}}|{{#show:{{{root}}}|?docinfo priority}}}}
+
  |{{#if:{{#show:{{#var:root}}|?docinfo master page#}}
-
|category  = {{#if:{{{category|}}}|{{{category}}}|{{#show:{{{root}}}|?docinfo category}}}}
+
   |{{#show:{{#var:root}}|?docinfo master page#}}/{{#var:path}}
-
|author    = {{#if:{{{author|}}}  |{{{author}}}  |{{#show:{{{root}}}|?docinfo author}}}}
+
-
  |editor    = {{#if:{{{editor|}}}  |{{{editor}}}  |{{#show:{{{root}}}|?docinfo editor}}}}
+
-
|support    = {{#if:{{{support|}}} |{{{support}}} |{{#show:{{{root}}}|?docinfo support}}}}
+
-
|lang      = {{#if:{{{lang|}}}    |{{{lang}}}    |{{#show:{{{root}}}|?docinfo language}}}}
+
-
|desc = {{#if:{{{desc|}}}
+
-
  |{{{desc}}}
+
-
  |{{#if:{{{master page|}}}
+
-
  |{{#show:{{{master page}}}|?description}}
+
-
   |{{#show:{{#show:{{{root}}}|?docinfo master page}}/{{#titleparts:{{PAGENAME}}|-1|2}}|?description}}
+
   }}
   }}
-
  }}
 
-
|heading = {{#if:{{{heading|}}}
 
-
  |{{{hading}}}
 
-
  |{{#if:{{{master page|}}}
 
-
  |{{#show:{{{master page}}}|?book heading}}
 
-
  |{{#show:{{#show:{{{root}}}|?docinfo master page}}/{{#titleparts:{{PAGENAME}}|-1|2}}|?book heading}}
 
-
  }}
 
-
  }}
 
-
|title = {{#if:{{{title|}}}
 
-
  |{{{title}}}
 
-
  |{{#if:{{{master page|}}}
 
-
  |{{#show:{{{master page}}}|?book title}}
 
-
  |{{#show:{{#show:{{{root}}}|?docinfo master page}}/{{#titleparts:{{PAGENAME}}|-1|2}}|?book title}}
 
-
  }}
 
-
  }}
 
-
|next = {{#if:{{{next|}}}
 
-
  |{{{next}}}
 
-
  |{{#if:{{{master page|}}}
 
-
  |{{#show:{{{master page}}}|?book next}}
 
-
  |{{#show:{{#show:{{{root}}}|?docinfo master page}}/{{#titleparts:{{PAGENAME}}|-1|2}}|?book next}}
 
-
  }}
 
-
  }}
 
-
|prev = {{#ask:
 
-
  [[Category:Books]]
 
-
  [[book next::{{FULLPAGENAME}}]]
 
-
  |format = list
 
-
  |limit = 1
 
-
  |link = none
 
   }}
   }}
  }}
  }}
-
|{{book/core
+
}}{{#ifeq:{{#var:main}}|{{FULLPAGENAME}}
-
|master page = {{{master page|}}}
+
|{{#vardefine:main|}}
-
|master rev = {{{master rev|}}}
+
|
-
  |status      = {{{status|}}}
+
}}{{#if:{{#var:path}}
-
  |progress   = {{{progress|}}}
+
|{{ #vardefine:stat|{{#if:{{{status|}}}  |{{{status}}}  |{{#show:{{#var:root}}|?docinfo status}}}}
-
  |priority   = {{{priority|}}}
+
  }}{{#vardefine:prog|{{#if:{{{progress|}}}|{{{progress}}}|{{#show:{{#var:root}}|?docinfo progress}}}}
-
  |category   = {{{category|}}}
+
  }}{{#vardefine:prio|{{#if:{{{priority|}}}|{{{priority}}}|{{#show:{{#var:root}}|?docinfo priority}}}}
-
  |author     = {{{author|}}}
+
  }}{{#vardefine:cate|{{#if:{{{category|}}}|{{{category}}}|{{#show:{{#var:root}}|format=list|?docinfo category#}}}}
-
  |editor     = {{{editor|}}}
+
  }}{{#vardefine:auth|{{#if:{{{author|}}}  |{{{author}}}  |{{#show:{{#var:root}}|format=list|?docinfo author#}}}}
-
  |support     = {{{support|}}}
+
  }}{{#vardefine:edit|{{#if:{{{editor|}}}  |{{{editor}}}  |{{#show:{{#var:root}}|format=list|?docinfo editor#}}}}
-
  |lang       = {{{lang|}}}
+
  }}{{#vardefine:supp|{{#if:{{{support|}}} |{{{support}}} |{{#show:{{#var:root}}|format=list|?docinfo support#}}}}
-
  |desc = {{#if:{{{desc|}}}
+
  }}{{#vardefine:lang|{{#if:{{{lang|}}}    |{{{lang}}}    |{{#show:{{#var:root}}|?docinfo language}}}}
-
  |{{{desc}}}
+
  }}
-
  |{{#if:{{{mastert page|}}}|{{#show:{{{master page}}}|?description}}}}
+
|{{ #vardefine:stat|{{{status|}}}
-
  }}
+
}}{{#vardefine:prog|{{{progress|}}}
-
  |heading = {{#if:{{{heading|}}}
+
}}{{#vardefine:prio|{{{priority|}}}
-
  |{{{hading}}}
+
}}{{#vardefine:cate|{{{category|}}}
-
  |{{#if:{{{master page|}}}|{{#show:{{{master page}}}|?book heading}}}}
+
}}{{#vardefine:auth|{{{author|}}}
-
  }}
+
}}{{#vardefine:edit|{{{editor|}}}
-
|title = {{#if:{{{title|}}}
+
  }}{{#vardefine:supp|{{{support|}}}
-
  |{{{title}}}
+
}}{{#vardefine:lang|{{{lang|}}}
-
  |{{#if:{{{master page|}}}|{{#show:{{{master page}}}|?book title}}}}
+
}}
-
  }}
+
}}{{#if:{{#var:main}}
-
|next = {{#if:{{{next|}}}
+
|{{  #vardefine:mrev|{{{master rev|}}}
-
   |{{{next}}}
+
}}{{#vardefine:head|{{#if:{{{heading|}}}|{{{heading}}}|{{#show:{{#var:main}}|?book heading}}}}
-
   |{{#if:{{{master page|}}}|{{#show:{{{master page}}}|?book next}}}}
+
}}{{#vardefine:titl|{{#if:{{{title|}}} |{{{title}}}  |{{#show:{{#var:main}}|?book title}}}}
-
  }}
+
}}{{#vardefine:next|{{#if:{{{next|}}}   |{{{next}}}  |{{#show:{{#var:main}}|?book next}}}}
-
  |prev = {{#ask:
+
}}{{#vardefine:desc|{{#if:{{{desc|}}}  |{{{desc}}}  |{{#show:{{#var:main}}|?description}}}}
-
  [[Category:Books]]
+
}}
-
  [[book next::{{FULLPAGENAME}}]]
+
|{{ #vardefine:head|{{{heading|}}}
-
  |format = list
+
}}{{#vardefine:titl|{{{title|}}}
-
  |limit = 1
+
}}{{#vardefine:next|{{{next|}}}
-
  |link = none
+
  }}{{#vardefine:desc|{{{desc|}}}
-
  }}
+
}}
 +
}}{{#vardefine:prev|{{#ask:
 +
[[Category:Books]]
 +
[[book chain::{{FULLPAGENAME}}]]
 +
|format = list
 +
|limit = 1
 +
|link = none
 +
}}
 +
}}<!-- 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|{{#var:next}}|{{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:100%;<!--
 +
      --> margin:1em 0px 0px 0px;<!--
 +
      --> padding:0px; <!--
 +
      --> white-space:nowrap;<!--
 +
      -->"
 +
|style="vertical-align:bottom;<!--
 +
    --> text-align:left;<!--
 +
    -->"|<span class="subpages">{{Book/Link
 +
|{{#var:prev}}
 +
|&lt;&nbsp;{{message|Prev|dict=nav|nocat}}
 +
}}</span>
 +
|style="vertical-align:bottom;<!--
 +
    --> text-align:center;<!--
 +
    -->"|<span class="subpages">{{Book/Link
 +
|..
 +
|{{message|Up|dict=nav|nocat}}
 +
}}</span>
 +
|style="vertical-align:bottom;<!--
 +
    --> text-align:right;<!--
 +
    -->"|<span class="subpages">{{Book/Link
 +
|{{#var:next}}
 +
|{{message|Next|dict=nav|nocat}}&nbsp;&gt;
 +
}}</span>
 +
|-
 +
|style="width:40%;<!--
 +
    --> vertical-align:bottom;<!--
 +
    --> text-align:left;<!--
 +
    --> white-space:nowrap;<!--
 +
    -->"|<span class="subpages">{{Book/Link|{{#var:prev}}|show=all}}</span>
 +
|style="width:20%;<!--
 +
    --> vertical-align:bottom;<!--
 +
    --> text-align:center;<!--
 +
    --> white-space:nowrap;<!--
 +
    -->"|<span class="subpages">{{Book/Link|{{#var:root}}|show=all}}</span>
 +
|style="width:40%;<!--
 +
    --> vertical-align:bottom;<!--
 +
    --> text-align:right;<!--
 +
    --> white-space:nowrap;<!--
 +
    -->"|<span class="subpages">{{Book/Link|{{#var:next}}|show=all}}</span>
 +
|}
 +
{{languages|{{#var:main}}}}
 +
{{documentation debug}}
 +
</div>
 +
{{DISPLAYTITLE:{{#if:{{#var:head}}|{{#var:head}}&nbsp;}}{{#var:titl}}
 +
}}{{docinfo
 +
|master page = {{#var:main}}
 +
|master rev  = {{#var:mrev}}
 +
|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:{{#replace:{{#var:next}}|~|{{#var:root}}}}|{{FULLPAGENAME}}}}
  }}
  }}
-
}}</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