How to document a template

These rules are for the sake of consistency and completeness. So if you add something to the wiki, please keep them in mind.

What should you add to the wiki?

  • Finished templates should be documented on a per asset basis (1 wiki page per asset).
  • Non asset templates (e.g. account) should have a page per category (account, style, authentication etc.).
  • There will be some pages on specific topics, like the wg-base stylesheet, browser hacks.

What shouldn't you add to the wiki?

  • Good practices and rules should be added to the checklists (but if it's a lenghty bit of text, you can make an exeption: add it to the wiki and link to it from the checklists).
  • Classes and IDs should not have their own wiki page; they have to be documented on the asset-specific pages.
  • Info on projects that have their own page on this site, like forms, the theming process and stylesheets.

How to document templates?

There are six items that should be added when documenting a set of templates.

Current templates
A list of all the templates that have been cleaned up and added to the code.
Templates removed
A list of all the templates that used to be in the core, but have been removed.
Classes and IDs
A list of all classes and IDs, per template; the distinction between both can be made by using # and . (#sitewrapper is an ID and .articleContent is a class).
Stylesheet(s)
A list of all stylesheets for the asset
Cross template notes
If a template contains code that can be found in templates for different assets, like pagination or inline icons, list those items here (these are the items that are styled in the wg-base.css).
Bug and RFE notes
If you fix a bug or implement an RFE, please add that to the wiki page as well; this is only necessary for bugs/RFEs that were fixed after the new template was committed.

It may seem like a lot of work, but remember that most of the info has to be written for the gotchas anyway. Take a look at the article wiki page for an example. Thanks!

Keywords: checklists documentation how to rules

Search | Most Popular | Recent Changes | Wiki Home