https://bugzilla.wikimedia.org/show_bug.cgi?id=32654

       Web browser: ---
             Bug #: 32654
           Summary: SemanticMediaWiki: Named arguments for template +
                    debug output.
           Product: MediaWiki extensions
           Version: any
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: Unprioritized
         Component: Semantic MediaWiki
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified


> {{ #ask: ...
> | ?Code
> | ?Title
> | ?Modification date
> | format     = ol/ul/template
> | template   = template name
> | named args = yes (default is no)
> | debug      = yes (default is no)
> }}

If `named args' is `yes' (or something else evaluated by `Validator' as true),
`template name' template will be called using named arguments, not positional.
Names of arguments are printout labels, including leading question mark. 

It increases readability of template code. Instead of

> {{{1}}}. {{{2}}} (modified on {{{3}}})

code looks like:

> {{{?Code}}}. {{{?Title}}} (modified on {{{?Modification date}}})

Additionally, if `debug' is `yes' (or another true value), template is *not*
expanded. It helps to debug issues.

If you consider the patch useful, I will add messages and update documentation.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to