Wikisage, the free encyclopedia of the second generation, is digital heritage
Template:PAGENAMEBASE: Difference between revisions
Jump to navigation
Jump to search
(Templateinfo instead of Documentation) |
(cat) |
||
Line 19: | Line 19: | ||
* {{PAGENAMEBASE|foo bar}} → "foo bar" | * {{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"