Template:Book/PageTitle

From open-support.info

< Template:Book(Difference between revisions)
Jump to: navigation, search
m
m
 
(9 intermediate revisions not shown)
Line 1: Line 1:
-
{{#if:{{{1|}}}
+
{{#vardefine:cpag|{{#if:{{{1|}}}|{{{1}}}|{{FULLPAGENAME}} }}
-
|{{#if:{{#show:{{{1}}}|?book title}}
+
}}{{#vardefine:mpag|{{#show:{{#var:cpag}}|?docinfo master page#}}
-
|{{#show:{{{1}}}|?book title}}
+
}}{{#if:{{#var:mpag}}
-
|{{#if:{{#show:{{#show:{{{1}}}|?docinfo main#}}|?book title}}
+
|
-
   |{{#if:{{#show:{{{1}}}|?docinfo main#}}
+
|{{#vardefine:mpag|{{#show:{{#titleparts:{{#var:cpag}}|1}}|?docinfo master page#}}
-
  |{{#if:{{#show:{{#show:{{{1}}}|?docinfo main#}}|?book title}}
+
}}{{#if:{{#var:mpag}}
-
    |{{#show:{{#show:{{{1}}}|?docinfo main#}}|?book title}}
+
|{{#vardefine:mpag|{{#var:mpag}}<!--
-
    |{{{1}}}
+
   -->{{#if:{{#titleparts:{{#var:cpag}}||2}}|/{{#titleparts:{{#var:cpag}}||2}} }} }}
-
    }}
+
|
-
  |{{{1}}}
+
}}
-
  }}
+
}}{{#switch:{{{show|}}}
-
  |{{{1}}}
+
|
-
  }}
+
|all
 +
|title={{#vardefine:title|{{#show:{{#var:cpag}}|?book title}}
 +
}}{{#if:{{#var:title}}
 +
|
 +
|{{#if:{{#var:mpag}}|{{#vardefine:title|{{#show:{{#var:mpag}}|?book title}} }} }}
 +
}}{{#if:{{#var:title}}
 +
|
 +
|{{#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}}
-
  |{{#if:{{#show:{{#show:{{FULLPAGENAME}}|?docinfo main#}}|?book title}}
+
|
-
    |{{#show:{{#show:{{FULLPAGENAME}}|?docinfo main#}}|?book title}}
+
|{{#if:{{#var:mpag}}
-
    |{{FULLPAGENAME}}
+
  |{{#vardefine:heading|{{#show:{{#var:mpag}}|?book heading}} }}
-
    }}
+
-
  |{{FULLPAGENAME}}
+
-
  }}
+
-
  |{{FULLPAGENAME}}
+
   }}
   }}
  }}
  }}
 +
}}{{#switch:{{{show|}}}
 +
|all    = {{#if:{{#var:heading}}|{{#var:heading}}&nbsp;}}{{#var:title}}
 +
|heading = {{#var:heading}}
 +
|{{#var:title}}
}}<noinclude>
}}<noinclude>
{{docinfo
{{docinfo

Latest revision as of 08:57, 23 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