Apr 082009

I’ve added three helpful new templates to MDC that will help us standardize the look and feel of certain special situations in reference documentation:

The new method_noscript template is used to create a section heading for an interface method which can only be called from native code.  You use it like this:


This creates a heading that looks like this:

The next template is method_fx_minversion, which creates a section heading for an interface method introduced in a specified version of Firefox.  For example:

{{template.method_fx_minversion(“methodName”, “3.5”)}}

The resulting heading looks like this:

Finally, the method_gecko_minversion template is used to badge a method as being introduced in a specified version of Gecko, like this:

{{template.method_gecko_minversion(“methodName”, “1.9.1”)}}

This produces the following heading:

The right edges actually do line up in real usage… I resized my window some in between taking these screenshots, and was too lazy to redo them.

These should help us make the documentation more concise in expressing this information to readers.

 Posted by at 3:21 AM

  2 Responses to “Handy new templates for MDC”

  1. There’s still a whole bunch of “Requires Firefox 3.1” labels floating around on MDC. I don’t suppose someone could do a global find/replace on all of them?

  2. Because those tags are done with templates, they can be tricky to find. When you see one, just fix it. I haven’t seen one recently, so they’re hiding pretty well.

This site uses Akismet to reduce spam. Learn how your comment data is processed.