User:Sethladan/Template Notes

Jump to: navigation, search

Scratchpad for template project (also coordinate on Project:System Tools and Project:Documentation). Struck items are considered addressed.

General goal domains:


  • Ensure every template has a /doc.
    • This is overkill for some of them, but setting a strict standard reduces ambiguity and encourages conformity down the road
  • Develop consistent formats for /doc pages
    • Probably one for short/simple templates and another for big honkin' ones
  • Ensure every parameter is specified on the /docs
  • I ended up creating a very basic (so far) Template:Documentation.
    • Takes care of intro text, linking, and categorization to Category:Template Documentation
    • Borrows the green box from Wikipedia
    • Has a couple of limitations
      • Raw equals sign (use nowiki or Template:=)
      • MediaWiki table syntax breaks the template, too
      • Probably can't handle subpages with current implementation - I worked around this with the stub templates, but this needs to be addressed, possibly with #titleparts?
    • Need to make a second parameter for categories so we don't have to play the include game as much.

Tentative doc page layout:

== Usage ==
Describe the purpose and function of the template, when to use it, when a different template might be indicated, and any considerations/gotchas to be aware of.

(preformatted template syntax box here - one liner for short templates/positional parameters, big box for the larger ones)
<pre>{{Template | <positional parameter> | [positional parameter=]<with optional keyword> | keyword=parameter }}<\pre>

=== Parameters ===
Definition-list itemization of all parameters, identifying each as optional or required and describing the range and effects each has.

== Examples ==
Minimal working example code for most-common uses for the template, followed by output if applicable.

|[[Template Categorization]]}}
  • Note template's category on the doc page
  • To consider: A blank copy is nice to have, especially for the larger "main" templates.

Bug fixing/features

  • Review the talk pages for each template to see what's been requested/reported and see if it's still an issue
  • Clean up article management tags to develop a more uniform look
    • Some of them still have linebreak/spacing bugs
  • nocat=y promulgation

Refactoring/code cleanup

  • My favorite part!
  • Update all antiquated code/HTML/stylings
  • Develop a consistent formatting style and possibly write up a style guide for other editors (wrt template code only, not wikification stuff)
  • Break out repetitive styles into CSS classes

Template page layout:

<includeonly>Template wiki-code here...
  • Put template's categories on the doc pages
  • Ensure no linebreaks before/after/between the includes


A lot of templates stand to be consolidated or eliminated. Also need to come up with a better category structure for them to live in.


First pass: Standardized includes on all template pages, added/template'd all /doc pages

Interim: Tweaked doc template to handle subpages better, added parameter for categories

Second pass: Fill in all the /doc pages based on current template functionality, parameterize categories instead of includeonlies