Page MenuHomePhabricator

TemplateData: Consider support for non-template transclusions (magic words, parser functions)
Open, HighPublic

Description

Right now it is only intended for data about custom wiki-made templates.

To support magic words and parser functions, we'll need to make a few changes to make sure there are no conflicts or wrong assumptions.

A few random points:

  • 'titles' parameter in the API module
  • The PHP parser prefers native magic word over templates (creating Template:PAGENAME and using {{PAGENAME}}, will not use that template).
  • Should there be an implied property 'type':
    • type:template -> {{Foo}}, {{:Foo}}, {{Template:Foo}}, {{Project:Foo}}
    • type:parserfunction -> {{PAGENAME}}, {{urlencode:123}}, {{#special:Watchlist}}
  • parser functions don't have numerical parameters, and the first parameter is separated by colon, not by pipe. So we need a way (both in TemplateData and VisualEditor) to insert unnamed parameters without using numbers.

    e.g. {{urlencode:Foo|WIKI}} is correct, but {{urlencode:Foo|1=WIKI}} or {{urlencode:1=Foo|2=WIKI}} or {{urlencode|1=Foo|2=WIKI}} is wrong.

Version: unspecified
Severity: normal

Details

Reference
bz53413