Difference between revisions of "Template:TitleOnly"

From ChoralWiki
Jump to navigation Jump to search
(updated doc)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
 
<includeonly>
 
<includeonly>
{{#if:{{#explode:{{{1|{{PAGENAME}}}}}|(|3}}|{{#explode:{{{1|{{PAGENAME}}}}}|(|0}}({{#explode:{{{1|{{PAGENAME}}}}}|(|1}}({{#sub:{{#explode:{{{1|{{PAGENAME}}}}}|(|2}}|-1}}
+
{{#if:{{#explode:{{{1|{{PAGENAME}}}}}|(|3}}|{{#explode:{{{1|{{PAGENAME}}}}}|(|0}}({{#explode:{{{1|{{PAGENAME}}}}}|(|1}}({{#explode:{{{1|{{PAGENAME}}}}}|(|2}}
 
|{{#if:{{#explode:{{{1|{{PAGENAME}}}}}|(|2}}|{{#explode:{{{1|{{PAGENAME}}}}}|(|0}}({{#explode:{{{1|{{PAGENAME}}}}}|(|1}}
 
|{{#if:{{#explode:{{{1|{{PAGENAME}}}}}|(|2}}|{{#explode:{{{1|{{PAGENAME}}}}}|(|0}}({{#explode:{{{1|{{PAGENAME}}}}}|(|1}}
 
|{{#if:{{#explode:{{{1|{{PAGENAME}}}}}|(|1}}|{{#explode:{{{1|{{PAGENAME}}}}}|(|0}}|{{{1|{{PAGENAME}}}}}}}}}}}
 
|{{#if:{{#explode:{{{1|{{PAGENAME}}}}}|(|1}}|{{#explode:{{{1|{{PAGENAME}}}}}|(|0}}|{{{1|{{PAGENAME}}}}}}}}}}}
 
</includeonly><noinclude><!--
 
</includeonly><noinclude><!--
  
-->{{DisplayBox|title=Documentation|text=
+
-->{{Doc|text=
 
Extracts the Title portion from a work title:
 
Extracts the Title portion from a work title:
  
 
{{tl|TitleOnly|Brattle Street (1786) (William Billings)}} returns {{TitleOnly|Brattle Street (1786) (William Billings)}}
 
{{tl|TitleOnly|Brattle Street (1786) (William Billings)}} returns {{TitleOnly|Brattle Street (1786) (William Billings)}}
{{tl|TitleOnly|Psalmen Davids, Op. 5 (1661) (Heinrich Schütz)}} returns {{TitleOnly|Psalmen Davids, Op. 5 (1661) (Heinrich Schütz)}}
+
{{tl|TitleOnly|Psalmen Davids, Op. 5 (Heinrich Schütz)}} returns {{TitleOnly|Psalmen Davids, Op. 5 (Heinrich Schütz)}}
 
{{tl|TitleOnly|Tenebrae Responsories (Tomás Luis de Victoria)}} returns {{TitleOnly|Tenebrae Responsories (Tomás Luis de Victoria)}}
 
{{tl|TitleOnly|Tenebrae Responsories (Tomás Luis de Victoria)}} returns {{TitleOnly|Tenebrae Responsories (Tomás Luis de Victoria)}}
 +
{{tl|TitleOnly|Svētais Jāzep (in D, C) (Magne Ioseph) (Anonymous)}} returns {{TitleOnly|Svētais Jāzep (in D, C) (Magne Ioseph) (Anonymous)}}
  
 
If no parameter is provided, <tt><nowiki>{{PAGENAME}}</nowiki></tt> is used:
 
If no parameter is provided, <tt><nowiki>{{PAGENAME}}</nowiki></tt> is used:
  
{{tl|TitleOnly}}
+
{{tl|TitleOnly}} on the works page [[Brattle Street (1786) (William Billings)]]
:returns
+
:will return
{{TitleOnly}}
+
{{TitleOnly|Brattle Street (1786) (William Billings)}}
 +
 
 +
===See also===
 +
*{{tl|CompFromWorkTitle}} - complementary template
 
}}
 
}}
  
 
[[Category:Templates]]</noinclude>
 
[[Category:Templates]]</noinclude>

Latest revision as of 03:15, 25 March 2021

Documentation

Extracts the Title portion from a work title:

{{TitleOnly|Brattle Street (1786) (William Billings)}} returns Brattle Street (1786)

{{TitleOnly|Psalmen Davids, Op. 5 (Heinrich Schütz)}} returns Psalmen Davids, Op. 5

{{TitleOnly|Tenebrae Responsories (Tomás Luis de Victoria)}} returns Tenebrae Responsories

{{TitleOnly|Svētais Jāzep (in D, C) (Magne Ioseph) (Anonymous)}} returns Svētais Jāzep (in D, C) (Magne Ioseph)


If no parameter is provided, {{PAGENAME}} is used:

{{TitleOnly}} on the works page Brattle Street (1786) (William Billings)

will return

Brattle Street (1786)


See also