Forum:Sources template parameters

From Traveller Wiki - Science-Fiction Adventure in the Far future
Jump to navigation Jump to search
Forums: Index > Watercooler > Sources template parameters

Notes (2018)[edit]

So a new external request for changing Template:Sources.

I'm very reluctant to make changes to this template because it is literally on every single page in the wiki. And any change to the template will cause the wiki background process to update every article in the wiki, a process that could take a day or more. It's also one of the older templates in the wiki, so its design is fairly primitive.

So the current setup if the template uses the parameters S1 to S50.

  |S1= {{Ludog...}}
  |S2= Author: ...
  |S3= Maksim...

The request was to no longer use the parameter names like "S1" or "S27". The reason is adding a new source into the middle of the resources requires renumbering all of the parameters. This is time consuming and error prone.

In theory we don't need to keep the parameters in strict numeric sequence. It would allow for less renumbering for a few added sources. But that's just a work around.

The real solution to this would be to use the positional parameters. For using this would look like this:

 |Author: ...

When you add new items into the list, they are automatically added to the list in the order they are displayed in the template.

The challenge here is we can't just change the template. Doing that would break every page in the wiki. It would need to support both. Fortunately the template isn't complicated and this can be done easily. Anyone like this idea? Tjoneslo (talk) 18:33, 28 November 2018 (EST)

What I'd really like is something like this:

|S#= {{Ludog...}}
|S#= {{Ludog...}}
|S#= {{Ludog...}}

That's my take.

- Maksim-Smelchak (talk) 20:47, 28 November 2018 (EST)

Parameter to templates don't work that way, unfortunately. Tjoneslo (talk) 21:02, 28 November 2018 (EST)