Template:Book/PageTitle
From open-support.info
(Difference between revisions)
m |
m |
||
Line 1: | Line 1: | ||
- | {{#if:{{{1|}}} | + | {{ #vardefine:cpag|{{#if:{{{1|}}}|{{{1}}}|{{FULLPAGENAME}} }} |
- | | | + | }}{{#vardefine:mpag|{{#show:{{#var:cpag}}|?book master page}} |
- | + | }}{{#switch:{{{show|}}} | |
- | + | |<!-- BLANK --> | |
- | + | |all | |
- | + | |title={{#vardefine:title|{{#show:{{#var:cpag}}|?book title}} | |
- | + | }}{{#if:{{#var:title}}|<!-- IS BLANK THEN --> | |
- | + | |{{#if:{{#var:mpag}} | |
- | + | |{{#vardefine:title|{{#show:{{#var:mpag}}|?book title}} }} | |
- | + | ||
- | + | ||
- | + | ||
}} | }} | ||
+ | }}{{#if:{{#var:title}}|<!-- IS BLANK THEN --> | ||
+ | |{{#vardefine:title|{{PAGENAME:{{#var:cpag}} }} }} | ||
}} | }} | ||
- | + | }}{{#switch:{{{show|}}} | |
- | + | |all | |
- | + | |heading={{#vardefine:heading|{{#show:{{#var:cpag}}|?book heading}} | |
- | + | }}{{#if:{{#var:heading}}|<!-- IS BLANK THEN --> | |
- | + | |{{#if:{{#var:mpag}} | |
- | + | |{{#vardefine:heading|{{#show:{{#var:mpag}}|?book heading}} }} | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
}} | }} | ||
}} | }} | ||
+ | }}{{#switch:{{{show|}}} | ||
+ | |all = {{#var:heading}} {{#var:title}} | ||
+ | |heading = {{#var:heading}} | ||
+ | |{{#var:title}} | ||
}}<noinclude> | }}<noinclude> | ||
{{docinfo | {{docinfo |
Revision as of 19:52, 21 April 2011
Book/PageTitle[edit] [ ] Template documentation
Template:Book/PageTitle – returns the respectable page title of a page in a book.
Usage
{{Book/PageTitle | PageName }}
The above documentation is transcluded from Template:Book/PageTitle/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. |