Template:Book

From open-support.info

(Difference between revisions)
Jump to: navigation, search
m
Line 1: Line 1:
-
{{Book/Init
+
{{book/core
-
}}{{#vardefine:book_next|{{#if:{{#var:book_lang}}
+
|next= {{#if:{{#var:book_lang}}
  |{{#show:{{BASEPAGENAME}}|?bookNext#}}
  |{{#show:{{BASEPAGENAME}}|?bookNext#}}
-
  |{{#if:{{{3|}}}|{{#rel2abs:{{{3}}}}}}}
+
  |{{#if:{{{3|}}}
 +
  |{{#rel2abs:{{{3}}} }}
 +
  }}
  }}
  }}
-
}}{{#vardefine:book_prev|{{#if:{{#var:book_lang}}
+
|prev= {{#if:{{#var:book_lang}}
-
  |{{#titleparts:{{#ask:[[Category:Books]][[bookNext::{{PAGENAME}}]]|format=list|limit=1|link=none}}|-1}}
+
  |{{#titleparts:
-
  |{{#ask:[[Category:Books]][[bookNext::{{PAGENAME}}]]|format=list|limit=1|link=none}}
+
  {{#ask:
 +
  [[Category:Books]]
 +
  [[bookNext::{{PAGENAME}}]]
 +
  |format=list
 +
  |limit=1
 +
  |link=none
 +
  }}
 +
  |-1
 +
  }}
 +
  |{{#ask:
 +
  [[Category:Books]]
 +
  [[bookNext::{{PAGENAME}}]]
 +
  |format=list
 +
  |limit=1
 +
  |link=none
 +
  }}
  }}
  }}
-
}}{{#vardefine:book_head|{{#if:{{{1|}}}
+
|head= {{#if:{{{1|}}}
  |{{{1}}}
  |{{{1}}}
  |{{#if:{{#var:book_lang}}|{{#show:{{#var:book_base}}|?bookHeading}}}}
  |{{#if:{{#var:book_lang}}|{{#show:{{#var:book_base}}|?bookHeading}}}}
  }}
  }}
-
}}{{DISPLAYTITLE:{{#if:{{#var:book_head}}|{{#var:book_head}} }}{{{2|}}}}}
+
}}<noinclude>
-
<!-- NavLink -->
+
-
<div id="bookTestSrc" style="display:none">
+
-
<span class="subpage" style="float:right">{{
+
-
#if:{{#var:book_prev}}|{{Book/Link|{{#var:book_prev}}|{{#var:book_msg_navprev}}}} &#124;&nbsp;}}{{
+
-
#if:{{#titleparts:{{PAGENAME}}|-1}}|{{Book/Link|..|{{#var:book_msg_navup}}}} &#124;&nbsp;}}{{
+
-
#if:{{#var:book_next}}|{{Book/Link|{{#var:book_next}}|{{#var:book_msg_navnext}}}}}}</span>
+
-
</div>
+
-
<!-- Footer -->
+
-
<div id="bookFooterSrc" 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:book_prev}}|{{#var:book_msg_navprev}}}}</span>
+
-
| style="width:30%;vertical-align:bottom;text-align:center"|<span class="subpages">{{Book/Link|..|{{#var:book_msg_navup}}}}</span>
+
-
| style="width:35%;vertical-align:bottom;text-align:right" |<span class="subpages">{{Book/Link|{{#var:book_next}}|{{#var:book_msg_navnext}}}}</span>
+
-
|-
+
-
| style="width:35%;vertical-align:bottom;text-align:left"  |<span class="subpages">{{Book/Link|{{#var:book_prev}}}}</span>
+
-
| style="width:30%;vertical-align:bottom;text-align:center"|<span class="subpages">{{Book/Link|{{#var:book_root}}}}</span>
+
-
| style="width:35%;vertical-align:bottom;text-align:right" |<span class="subpages">{{Book/Link|{{#var:book_next}}}}</span>
+
-
|}
+
-
{{Translations}}
+
-
</div>
+
-
<!-- {{#if:{{{1|}}}|{{#set:bookPageHeading={{{1}}}}}
+
-
}}{{#if:{{{2|}}}|{{#set:bookPageTitle={{{2}}}}}
+
-
}}{{#if:{{{3|}}}|{{#set:bookPageNext={{{3|}}}}}
+
-
}}{{#if:{{{4|}}}|{{#set:bookPagePrev={{{4|}}}}}
+
-
}} -->
+
-
{{#if:{{{1|}}}|{{#set:bookHeading={{{1|}}}}}
+
-
}}{{#if:{{{2|}}}|{{#set:bookTitle={{{2|}}}}}
+
-
}}{{#if:{{{3|}}}|{{#set:bookChain={{{3|}}}}}
+
-
}}{{#if:{{#var:book_root}}|{{#set:bookRoot={{#var:book_root}}}}
+
-
}}{{#if:{{#var:book_lang}}|{{#set:bookLang={{#var:book_lang}}}}
+
-
}}{{#if:{{#var:book_next}}|{{#set:bookNext={{#var:book_next}}{{#var:book_lang}}}}
+
-
}}
+
-
<includeonly>[[Category:Books]][[Category:{{#var:book_home}}]]</includeonly><noinclude>
+
{{documentation}}
{{documentation}}
 +
</noinclude>

Revision as of 05:08, 15 April 2011

Template:Book/core

[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