Template:Pipe Trick/doc

This template creates a link from text and acts like the pipe trick in ordinary links. For example, Some Feat (3.5e Feat) will be turned into Some Feat when the page is saved.

This template emulates that, for the purposes of DPL and ask queries. It will remove parenthesis at the end of a link, as well as namespaces at the front of a link. To use this template, just do, and make sure that the template argument is not itself a link. The template will resolve to Page.

This provides a workaround for how Semantic MediaWiki, when outputting links, will always output the suffix our wiki adds like (3.5e Class). Usually when displaying links, you don't want that -- so you can use this template to get around it. Your queries should include the template parameter, and use this template, along with "link=none". For example, for a comma-separated list of links without the suffix, you'd write:

Note that this will just remove the portion of the page title in parentheses, and will otherwise output full subpage names.