Page MenuHomePhabricator

Allow grouping of template parameters in TemplateData
Open, Needs TriagePublicFeature

Assigned To
None
Authored By
Lectrician1
Feb 25 2023, 7:22 PM
Referenced Files
F66776832: Vorlagenmeister named group example 2.png
Oct 22 2025, 12:39 AM
F66776767: Vorlagenmeister unnamed group example.png
Oct 22 2025, 12:39 AM
F49524889: image.png
Apr 30 2024, 10:30 PM
F49524729: image.png
Apr 30 2024, 10:30 PM

Description

Feature summary (what you would like to be able to do and where):

I would like to group similar parameters of templates so that viewing and finding them in documentation and the template editor is easier.

Use case(s) (list the steps that you performed to discover that problem, and describe the actual underlying problem which you want to solve. Do not describe only a solution):

  • Template:Infobox U.S. state's inline template documentation has groups for similar parameters. This grouping is not possible in TemplateData and thus it may not make sense to specify this template's documentation only using TemplateData.
  • wikidata:Template:Property proposal has specific parameters meant to be used only for property proposals of type "External identifier". It would be nice if we could organize these parameters under a "External identifier" parameter group.

Benefits (why should this be implemented?):

Better documentation and template editing experience.

Event Timeline

Lectrician1 renamed this task from Allow grouping of template paramaters in TemplateData to Allow grouping of template parameters in TemplateData.Feb 25 2023, 7:36 PM

What do you mean when you say "grouping"? How would this look like in the different tools that consume TemplateData? Does this include some functional changes, or is it really only visually?

Instead of just having a long list of parameters, in the template creator dialog, they could be grouped and those group names would act as separators/headers for their children parameters:

image.png (1×392 px, 82 KB)

Likewise on the template documentation page, these could be separated by H3 headings or something:

image.png (1×1 px, 267 KB)

Small note that the sets key exists and it's similar, but not identical, as grouped parameters are grouped "thematically" and not by function: they don't have to be used together to function.

Vorlagenmeister has this feature and it behaves differently depending on whether the group was given a name or not. I've brought some examples from huwiki.

Unnamed groups

<Group>
  <Parameter name="háttérszín">
    <Help></Help>
  </Parameter>
  <Parameter name="betűszín">
    <Help></Help>
  </Parameter>
</Group>
<Group>
  <Parameter name="név">
    <Help></Help>
  </Parameter>
</Group>
[...]

This XML pattern creates this layout:

Vorlagenmeister unnamed group example.png (1×2 px, 150 KB)

Named groups

<Group name="Általános">
  <Parameter name="név" label="név" null="false">
    <Help></Help>
  </Parameter>
  <Parameter name="helyi név" label="Helyi név">
    <Help></Help>
  </Parameter>
  <Parameter name="mottó" label="Mottó">
    <Help></Help>
  </Parameter>
   [...]
</Group>
<Group name="Képek">
  <Parameter name="kép" label="Városkép">
    <Help></Help>
  </Parameter>
  <Parameter name="képméret" label="Városkép mérete">
    <Help></Help>
  </Parameter>
  <Parameter name="képaláírás"  label="Városkép aláírása">
    <Help></Help>
  </Parameter>
   [...]
</Group>
[...]

While this XML pattern creates a layout with tabs that scroll to the relevant section:

Vorlagenmeister named group example 2.png (1×2 px, 175 KB)