Design Pattern "Display semantic title inline only when transcluding a page"

From SMW CindyKate - Main
Component 531439
Jump to: navigation, search

Content

Note: This design pattern requires https://www.mediawiki.org/wiki/Extension:Regex_Fun.

A page Clarification 352638 can be transcluded by {{:Clarification 352638}}. The transclusion will then display the {{{Semantic Display Title}}} according to the format specified below while its Has semantic display title declaration will be skipped in order not to interfere with the transcluding page's own Has semantic display title declaration.

{{#ifeq:{{#regex:{{PAGENAME}}|%^(.*) ([0-9]*)$%|$1}}|Clarification|{{#set:Has semantic display title=Clarification "{{{Semantic Display Title}}}"}}<includeonly>[[Category:Clarification]]</includeonly>|'''{{{Semantic Display Title}}}''' <sup>T</sup>}}