User:Bamyers99/TemplateParametersTool

The Template Parameters tool gives a breakdown of template parameter usage. It uses TemplateData to determine template parameter configuration.

Transclusion reporting
Only templates that are directly transcluded in an article/file are reported. Indirect transclusions via other templates are not reported.

Example: BS-map


 * The Template transclusion count tool shows many more transclusions than the Template parameters tool.
 * MiamiCentral directly transcludes BS-map, so it is reported by the Template parameters tool.
 * Finningley railway station indirectly transcludes BS-map via Doncaster to Lincoln Line, so it is not reported by the Template parameters tool.

Tool configuration
This provides additional template parameter configuration that TemplateData does not provide.

The tlp template is used to specify a configuration. The first parameter is the template to configure.

 parameter format



configuration type


 * regex: Perl Compatible Regular Expression to validate template parameter value against. Note: this has been requested per.
 * values : enumerated values to validate template parameter value against, separated by . Note: added per  as "Suggested values".
 * wikidata: wikidata property id. Note: proposal filed at Wikipedia talk:TemplateData.
 * yesno: yes/no field using yesno. There is no configuration data.

field name

This is the main field name as specified in the TemplateData definition for the template.

Aliases will automatically be handled properly.

Troubleshooting
To determine why Manage TemplateData gives an error or a json_error=4 occurs, use JSONLint on the JSON (the data inside ) to detect an error.

Source code

 * TemplateParameterBot (GitHub)
 * MWDumpTemplateParser (GitHub)