Template:Book
From open-support.info
(Difference between revisions)
m |
m |
||
(66 intermediate revisions not shown) | |||
Line 1: | Line 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:main|{{#if:{{{master page|}}} | |
- | + | |{{{master page}}} | |
- | + | |{{#if:{{#var:path}} | |
- | + | |{{#if:{{#show:{{#var:root}}|?docinfo master page#}} | |
- | | | + | |{{#show:{{#var:root}}|?docinfo master page#}}/{{#var:path}} |
- | + | ||
}} | }} | ||
- | |||
}} | }} | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
}} | }} | ||
- | |{{ | + | }}{{#ifeq:{{#var:main}}|{{FULLPAGENAME}} |
- | | | + | |{{#vardefine:main|}} |
- | + | | | |
- | + | }}{{#if:{{#var:path}} | |
- | + | |{{ #vardefine:stat|{{#if:{{{status|}}} |{{{status}}} |{{#show:{{#var:root}}|?docinfo status}}}} | |
- | | | + | }}{{#vardefine:prog|{{#if:{{{progress|}}}|{{{progress}}}|{{#show:{{#var:root}}|?docinfo progress}}}} |
- | # | + | }}{{#vardefine:prio|{{#if:{{{priority|}}}|{{{priority}}}|{{#show:{{#var:root}}|?docinfo priority}}}} |
- | [[Category:Books]] | + | }}{{#vardefine:cate|{{#if:{{{category|}}}|{{{category}}}|{{#show:{{#var:root}}|format=list|?docinfo category#}}}} |
- | + | }}{{#vardefine:auth|{{#if:{{{author|}}} |{{{author}}} |{{#show:{{#var:root}}|format=list|?docinfo author#}}}} | |
- | + | }}{{#vardefine:edit|{{#if:{{{editor|}}} |{{{editor}}} |{{#show:{{#var:root}}|format=list|?docinfo editor#}}}} | |
- | + | }}{{#vardefine:supp|{{#if:{{{support|}}} |{{{support}}} |{{#show:{{#var:root}}|format=list|?docinfo support#}}}} | |
- | + | }}{{#vardefine:lang|{{#if:{{{lang|}}} |{{{lang}}} |{{#show:{{#var:root}}|?docinfo language}}}} | |
- | + | }} | |
- | + | |{{ #vardefine:stat|{{{status|}}} | |
- | + | }}{{#vardefine:prog|{{{progress|}}} | |
- | + | }}{{#vardefine:prio|{{{priority|}}} | |
- | + | }}{{#vardefine:cate|{{{category|}}} | |
- | |root={{# | + | }}{{#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:{{#var:main}}|?book heading}}}} | ||
+ | }}{{#vardefine:titl|{{#if:{{{title|}}} |{{{title}}} |{{#show:{{#var:main}}|?book title}}}} | ||
+ | }}{{#vardefine:next|{{#if:{{{next|}}} |{{{next}}} |{{#show:{{#var:main}}|?book next}}}} | ||
+ | }}{{#vardefine:desc|{{#if:{{{desc|}}} |{{{desc}}} |{{#show:{{#var:main}}|?description}}}} | ||
+ | }} | ||
+ | |{{ #vardefine:head|{{{heading|}}} | ||
+ | }}{{#vardefine:titl|{{{title|}}} | ||
+ | }}{{#vardefine:next|{{{next|}}} | ||
+ | }}{{#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}}}} | | ||
+ | }}{{#if:{{#titleparts:{{PAGENAME}}|-1}} | ||
+ | |{{Book/Link|..|{{message|Up|dict=nav|nocat}}}} | | ||
+ | }}{{#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}} | ||
+ | |< {{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}} > | ||
+ | }}</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}} }}{{#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}}}} | ||
}} | }} | ||
- | }}<noinclude> | + | }}[[Category:Books|{{PAGENAME}}]]</includeonly><noinclude> |
- | {{documentation}} | + | {{documentation includeonly}} |
- | </noinclude> | + | </noinclude></onlyinclude> |
Latest revision as of 12:49, 29 April 2011
[edit] [ ] 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 above documentation is transcluded from Template:Book/doc. (edit | history) Editors can experiment in this template's sandbox (create) and testcases (create) pages. Please add categories and interwikis to the /doc subpage. Subpages of this template. |
The results of this template are not shown here.