Template:Title disambig text/doc
From WikiAlpha
This is a documentation subpage for Template:Title disambig text. It contains usage information, categories and other content that is not part of the original template page. |
30px | Uses Lua: {{safesubst:#invoke:list|bulleted}} |
Usage
-
{{Title disambig text|Title (disambig)}}
If page title is of the form Title (disambig), this function will return disambig. If no parenthetical expression is present, returns an empty string.
Write this to use the current page as title:
-
{{Title disambig text|{{PAGENAME}}}}
Examples
- {{Title disambig text|Title (whatever)}} → {{#invoke:String|match|Title (whatever)|%s%((.-)%)||-1|ignore_errors=true}}
- {{Title disambig text|[[Title (whatever)]]}} → {{#invoke:String|match|Title (whatever)|%s%((.-)%)||-1|ignore_errors=true}}
See also
Template:String-handling templates