Difference between revisions of "Template:TitleOnly"

From ChoralWiki
Jump to navigation Jump to search
(Created page with "<includeonly>{{#sub:{{#explode:{{{1|{{PAGENAME}}}}}|(|0}}|0|}}</includeonly><noinclude><!-- -->{{DisplayBox|title=Documentation|text= Extracts the Title portion from a work t...")
 
Line 1: Line 1:
<includeonly>{{#sub:{{#explode:{{{1|{{PAGENAME}}}}}|(|0}}|0|}}</includeonly><noinclude><!--
+
<includeonly>
 +
{{#if:{{#explode:{{{1|{{PAGENAME}}}}}|(|3}}|{{#explode:{{{1|{{PAGENAME}}}}}|(|0}}({{#explode:{{{1|{{PAGENAME}}}}}|(|1}}({{#sub:{{#explode:{{{1|{{PAGENAME}}}}}|(|2}}|-1}}
 +
|{{#if:{{#explode:{{{1|{{PAGENAME}}}}}|(|2}}|{{#explode:{{{1|{{PAGENAME}}}}}|(|0}}({{#explode:{{{1|{{PAGENAME}}}}}|(|1}}
 +
|{{#if:{{#explode:{{{1|{{PAGENAME}}}}}|(|1}}|{{#sub:{{#explode:{{{1|{{PAGENAME}}}}}|(|0}}|-1|}}|{{{1|{{PAGENAME}}}}}}}}}}}
 +
</includeonly><noinclude><!--
  
 
-->{{DisplayBox|title=Documentation|text=
 
-->{{DisplayBox|title=Documentation|text=
 
Extracts the Title portion from a work title:
 
Extracts the Title portion from a work title:
  
{{tl|TitleOnly|Brattle Street (1786) (William Billings)}}
+
{{tl|TitleOnly|Brattle Street (1786) (William Billings)}} returns {{TitleOnly|Brattle Street (1786) (William Billings)}}
:returns
+
{{tl|TitleOnly|Psalmen Davids, Op. 5 (1661) (Heinrich Schütz)}} returns {{TitleOnly|Psalmen Davids, Op. 5 (1661) (Heinrich Schütz)}}
{{TitleOnly|Brattle Street (1786) (William Billings)}}
 
 
 
  
 
If no parameter is provided, <tt><nowiki>{{PAGENAME}}</nowiki></tt> is used:
 
If no parameter is provided, <tt><nowiki>{{PAGENAME}}</nowiki></tt> is used:

Revision as of 01:02, 16 April 2019

Documentation

Extracts the Title portion from a work title:

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

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


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

{{TitleOnly}}

returns

TitleOnly