Wikisage, the free encyclopedia of the second generation, is digital heritage
Template:PAGENAMEBASE: Difference between revisions
Jump to navigation
Jump to search
(https://en.wikipedia.org/w/index.php?title=Template:PAGENAMEBASE&oldid=708575225) |
(Templateinfo instead of Documentation) |
||
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> | ||
{{ | {{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" | |||
}} | |||
</noinclude> | </noinclude> |
Revision as of 15:00, 31 January 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"