Page MenuHomePhabricator

Make TemplateData (or its interpretation) handle param1, param2, param3, ... paramN series more gracefully
Closed, DuplicatePublic

Description

Current state:

The infobox has a parameter that can be used repeatedly, with incrementing numbers. So sports-season1=, sports-season2=, sports-season3=, sports-season4=, sports-season5=, sports-season6=, etc.

Your current choices are:

  1. Add a separate line in TemplateData for every single one of these numbers (could be dozens), or
  2. Have the parameters scrambled in the wikitext, because there's no way to define their order in TemplateData.

Desired state:

Have a parameter type for paramN, so that you only need one entry in TemplateData to cover dozens of otherwise identical parameters.

Then keep all the numbered ones together (or interleaved with other related numbered ones, e.g., image1 with caption1).

Event Timeline

Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptJul 6 2016, 5:31 PM
ssastry added a subscriber: ssastry.Jul 6 2016, 5:49 PM

Minor comment: It cannot be "somestringN" since "somestringN" might be a valid parameter name. Maybe something like "somestring<N>" which wouldn't be a valid template parameter name.

Ltrlg added a subscriber: Ltrlg.EditedJul 9 2016, 8:29 AM

Minor comment: It cannot be "somestringN" since "somestringN" might be a valid parameter name. Maybe something like "somestring<N>" which wouldn't be a valid template parameter name.

Depends on what you call “valid”. It is weird to use such a name, but it works. Even braces can be part of a parameter name (however it can behave strangely when it looks like a template call or a template parameter and no one should ever try do such crazy things, ever).

The only two invalid characters I am aware of are the pipe and the equal sign, due to the syntax.

Elitre added a subscriber: Elitre.Aug 13 2016, 2:22 PM