[WikiEN-l] Template documentation convention

Steve Bennett stevage at gmail.com
Thu Apr 20 14:46:35 UTC 2006


On 20/04/06, Tim Starling <t.starling at physics.unimelb.edu.au> wrote:
> I've been thinking about introducing a tag which specifies that the source of the template should be
> displayed when you view the template page. There are a lot of meta-templates around where conversion
> to HTML with their default parameter values substituted in doesn't really tell you much about them.
> This would replace most uses for <includeonly>. Any comments on that?

Actually, to be honest, the best solution in most cases is probably to
show both the source *and* the rendered code. Maybe the way to do that
would be a __TEMPLATESOURCE__ tag, sort of like this:

<div style="clear: left; float: left"></div>
__TEMPLATESOURCE__

which would produce HTML roughly like

<div style="clear: left; float: left">
<H1>Code for this template:</H1>
<code>&lt;div style="clear: left; float: left"&gt;</code>

Admittedly, there is no benefit in showing the rendered template in
this case. But in others it's probably more helpful.

Steve



More information about the WikiEN-l mailing list