Template:PAGENAMEBASE/doc

< Template:PAGENAMEBASE
Revision as of 20:39, 23 July 2023 by Deadfire (talk | contribs) (Template Doc Creation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Usage[edit]

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

e.g. {{PAGENAMEBASE}} on page Chiton (genus) returns w:Chiton

on Sweet Dreams (Are Made of This) (album) returns w:Sweet Dreams (Are Made of This)
on Sweet Dreams (Are Made of This) returns w:Sweet Dreams

Can also pass an optional page parameter:

  • {{PAGENAMEBASE|foo (bar)}} → "foo"
  • {{PAGENAMEBASE|foo bar}} → "foo bar"

It is not to be confused with {{BASEPAGENAME}}, which is a magic word that strips subpages, not parentheses.

See also[edit]