Forum:Example Template for Documentation

The idea is to create a template that first shows the template's wiki code and then shows the output that code is generating. That should help adding examples to a documentation page. Here is what I got so far...

Template:

Use of the Template (on a documentation Page/doc):

But it's evil to have to write the same template call twice. So I am looking for something like this:

or

or (but don't like using | ...)

Any help is welcome on this :) Vanesyra 22:05, September 4, 2011 (UTC)

Maybe I misunderstood what you want, but I don't see the point of a template like that. Usually the documentation is handled like this, by putting the documentation in a subpage and showing it in the template page through this template. This way the template page isn't overloaded with the documentation. This template is also used to write the code in the examples, or you can always use the tags &lt;pre> Code &lt;/pre> for more complex codes. Feel fre to copy the whole template documentation system, but keep sure to have every templates listed in "dependencies", the categories used and the preloaded pages.


 * Some wikis use also a template like this one which display a notice (only) in the subpage documentation, also it will automatically add the category to the documentation page, so you will not have to add  at the end of the page. If you'll use this template, add it to the preload page.