Module:TemplateDataGenerator/doc

&#x3c;code&#x3e;Module:TemplateDataGenerator&#x3c;/code&#x3e; – Module for generation of a skeleton for TemplateData from the parameter usage within template programming.

From wikitext

 * f
 * Trigger analysis of template around (base page).
 * No parameters on &#x3c;code&#x3e;#invoke&#x3c;/code&#x3e;.
 * Yields block to be inserted by copy&#x26;paste.

Template wrapping
The module is supposed to be wrapped for convenience into something like a template &#x3c;nowiki&#x3e;&#x3c;/nowiki&#x3e; Documentation That template may be transcluded with one parameter: sort alias&#x26;nbsp;1&#x26;nbsp;– if that is provided with the value &#x3c;code&#x3e;1&#x3c;/code&#x3e;, parameter list will be sorted in alphabetical order.

Productive usage
When editing a template (documentation) page, users are supposed to insert the following line, where TemplateData shall appear: &#x3c;code&#x3e;&#x3c;nowiki&#x3e;f&#x3c;/nowiki&#x3e;&#x3c;/code&#x3e; After click on [Preview], the generated lines are displayed and can be inserted by copy &#x26; paste to replace the temporary transclusion.

If forgotten to remove on saving, &#x3c;code&#x3e;subst&#x3c;/code&#x3e; comes into effect and the plain lines are stored into source text. Next time someone will do the cleanup.

Functions for Lua modules

 * getBlock( about, ahead, alphabetical )
 * Trigger analysis of template like f but from Lua call.
 * about – string; page title related to template code on base page
 * ahead – string, number or nil; namespace (Template:)
 * alphabetical – boolean or nil; sort parameter list