Template:Book/PageTitle

From open-support.info

(Difference between revisions)
Jump to: navigation, search
m
m
Line 1: Line 1:
-
{{#if:{{{1|}}}
+
{{  #vardefine:cpag|{{#if:{{{1|}}}|{{{1}}}|{{FULLPAGENAME}} }}
-
|{{#if:{{#show:{{{1}}}|?book title}}
+
}}{{#vardefine:mpag|{{#show:{{#var:cpag}}|?book master page}}
-
|{{#show:{{{1}}}|?book title}}
+
}}{{#switch:{{{show|}}}
-
|{{#if:{{#show:{{#show:{{{1}}}|?docinfo main#}}|?book title}}
+
|<!-- BLANK -->
-
  |{{#if:{{#show:{{{1}}}|?docinfo main#}}
+
|all
-
  |{{#if:{{#show:{{#show:{{{1}}}|?docinfo main#}}|?book title}}
+
|title={{#vardefine:title|{{#show:{{#var:cpag}}|?book title}}
-
    |{{#show:{{#show:{{{1}}}|?docinfo main#}}|?book title}}
+
}}{{#if:{{#var:title}}|<!-- IS BLANK THEN -->
-
    |{{PAGENAME:{{{1}}} }}
+
|{{#if:{{#var:mpag}}
-
    }}
+
  |{{#vardefine:title|{{#show:{{#var:mpag}}|?book title}} }}
-
  |{{PAGENAME:{{{1}}} }}
+
-
  }}
+
-
  |{{PAGENAME:{{{1}}} }}
+
   }}
   }}
 +
}}{{#if:{{#var:title}}|<!-- IS BLANK THEN -->
 +
|{{#vardefine:title|{{PAGENAME:{{#var:cpag}} }} }}
  }}
  }}
-
|{{#if:{{#show:{{FULLPAGENAME}}|?book title}}
+
}}{{#switch:{{{show|}}}
-
|{{#show:{{FULLPAGENAME}}|?book title}}
+
|all
-
|{{#if:{{#show:{{#show:{{FULLPAGENAME}}|?docinfo main#}}|?book title}}
+
|heading={{#vardefine:heading|{{#show:{{#var:cpag}}|?book heading}}
-
  |{{#if:{{#show:{{FULLPAGENAME}}|?docinfo main#}}
+
}}{{#if:{{#var:heading}}|<!-- IS BLANK THEN -->
-
  |{{#if:{{#show:{{#show:{{FULLPAGENAME}}|?docinfo main#}}|?book title}}
+
|{{#if:{{#var:mpag}}
-
    |{{#show:{{#show:{{FULLPAGENAME}}|?docinfo main#}}|?book title}}
+
  |{{#vardefine:heading|{{#show:{{#var:mpag}}|?book heading}} }}
-
    |{{PAGENAME}}
+
-
    }}
+
-
  |{{PAGENAME}}
+
-
  }}
+
-
  |{{PAGENAME}}
+
   }}
   }}
  }}
  }}
 +
}}{{#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] [purge] Template documentation

Template:Book/PageTitle – returns the respectable page title of a page in a book.

Usage

{{Book/PageTitle | PageName }}
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox