Wikisage, the free encyclopedia of the second generation, is digital heritage

Template:PAGENAMEBASE: Difference between revisions

From Wikisage
Jump to navigation Jump to search
(https://en.wikipedia.org/w/index.php?title=Template:PAGENAMEBASE&oldid=708575225)
 
(cat)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{{{{|safesubst:}}}#Invoke:String|replace|{{{1|{{{{{|safesubst:}}}PAGENAME}}}}}|%s+%b()$||1|false}}<noinclude>
{{{{{|safesubst:}}}#Invoke:String|replace|{{{1|{{{{{|safesubst:}}}PAGENAME}}}}}|%s+%b()$||1|false}}<noinclude>
{{documentation}}
{{templateinfo|1=
;Purpose
This template returns the current <nowiki>{{PAGENAME}}</nowiki> minus (text in parentheses) or the final set of parentheses where more than one set exist.
 
;Use
The template is typically used in other templates.
 
;Examples
* <nowiki>{{PAGENAMEBASE}}</nowiki> on page Chiton (genus) returns Chiton
* on Sweet Dreams (Are Made of This) (album) returns Sweet Dreams (Are Made of This)
* on Sweet Dreams (Are Made of This) returns Sweet Dreams
* on Stadion der Freundschaft (Frankfurt (Oder)) returns Stadion der Freundschaft
* {{PAGENAMEBASE}}
 
Can also pass an optional page parameter:
 
* {{PAGENAMEBASE|foo (bar)}} → "foo"
* {{PAGENAMEBASE|foo bar}} → "foo bar"
}}
[[Category:Wikisage:Template:Auxiliary]]
</noinclude>
</noinclude>

Latest revision as of 22:50, 1 February 2017

{{safesubst:#Invoke:String|replace|PAGENAMEBASE|%s+%b()$||1|false}}

Template description
Purpose

This template returns the current {{PAGENAME}} minus (text in parentheses) or the final set of parentheses where more than one set exist.

Use

The template is typically used in other templates.

Examples
  • {{PAGENAMEBASE}} on page Chiton (genus) returns Chiton
  • on Sweet Dreams (Are Made of This) (album) returns Sweet Dreams (Are Made of This)
  • on Sweet Dreams (Are Made of This) returns Sweet Dreams
  • on Stadion der Freundschaft (Frankfurt (Oder)) returns Stadion der Freundschaft
  • {{safesubst:#Invoke:String|replace|PAGENAMEBASE|%s+%b()$||1|false}}

Can also pass an optional page parameter:

  • {{safesubst:#Invoke:String|replace|foo (bar)|%s+%b()$||1|false}} → "foo"
  • {{safesubst:#Invoke:String|replace|foo bar|%s+%b()$||1|false}} → "foo bar"