Template:Title disambig text/doc: Difference between revisions

From Campaigns
Jump to navigation Jump to search
Created page with "<noinclude>{{Documentation subpage}}</noinclude> {{lua|Module:String}} === Usage === : <code><nowiki>{{Title disambig text|Title (disambig)}}</nowiki></code> If page title i..."
 
(No difference)

Latest revision as of 01:37, 12 December 2022

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)}} → whatever
  • {{Title disambig text|[[Title (whatever)]]}} → whatever