Template:TemplatePAGENAME/doc

undefined inserts the name of the template currently being documented. It is equivalent to either &#123;{PAGENAME}&#125; or &#123;{BASEPAGENAME}&#125; depending on whether the currently viewed page is the documentation subpage or the template itself (which presumably transcludes the documentation subpage via documentation).