Difference between revisions of "Template:Book Nav"
Jump to navigation
Jump to search
(Import: Book navigation template) |
(Add title parameter for translated book titles) |
||
| Line 13: | Line 13: | ||
* <code>prev</code> - Previous chapter page (optional) | * <code>prev</code> - Previous chapter page (optional) | ||
* <code>next</code> - Next chapter page (optional) | * <code>next</code> - Next chapter page (optional) | ||
| + | * <code>title</code> - Display title for center link (optional, defaults to book page name) | ||
[[Category:Templates]] | [[Category:Templates]] | ||
</noinclude><includeonly><div class="book-nav"> | </noinclude><includeonly><div class="book-nav"> | ||
<div class="book-nav-prev">{{#if:{{{prev|}}}|<span class="book-nav-label">Previous</span>[[{{{prev}}}|◀ {{#titleparts:{{{prev}}}|1|2}}]]|}}</div> | <div class="book-nav-prev">{{#if:{{{prev|}}}|<span class="book-nav-label">Previous</span>[[{{{prev}}}|◀ {{#titleparts:{{{prev}}}|1|2}}]]|}}</div> | ||
| − | <div class="book-nav-center">[[{{{book}}}|{{{book}}}]]</div> | + | <div class="book-nav-center">[[{{{book}}}|{{#if:{{{title|}}}|{{{title}}}|{{{book}}}}}]]</div> |
<div class="book-nav-next">{{#if:{{{next|}}}|<span class="book-nav-label">Next</span>[[{{{next}}}|{{#titleparts:{{{next}}}|1|2}} ▶]]|}}</div> | <div class="book-nav-next">{{#if:{{{next|}}}|<span class="book-nav-label">Next</span>[[{{{next}}}|{{#titleparts:{{{next}}}|1|2}} ▶]]|}}</div> | ||
</div></includeonly> | </div></includeonly> | ||
Latest revision as of 02:34, 26 March 2026
Navigation template for book chapter pages. Place at the top and bottom of each chapter page.
Usage:
{{Book Nav|book=History_of_Sinology|prev=History_of_Sinology/Chapter_1|next=History_of_Sinology/Chapter_3}}
Parameters:
book- Main book page (required)prev- Previous chapter page (optional)next- Next chapter page (optional)title- Display title for center link (optional, defaults to book page name)