This is the template sandbox page for Template:Title disambig text (diff). See also the companion subpage for test cases. |
This template is used on approximately 240,000 pages. To avoid major disruption and server load, any changes should be tested in the template's /sandbox or /testcases subpages, or in your own user subpage. The tested changes can be added to this page in a single edit. Consider discussing changes on the talk page before implementing them. Preview message: Transclusion count updated automatically (see documentation). |
This template uses Lua: |
{{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}}}}
{{Title disambig text|Title (whatever)}}
→ whatever{{Title disambig text|[[Title (whatever)]]}}
→ whatever