Template:Demo/Doc

From PCSAR

Revision as of 04:10, 21 September 2011 by Brett Wuth (Talk | contribs)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

This template is used to create a demonstration of a mediawiki technique.

It shows both what you type and what you get. Such as:


You type... You get...
I want '''this in bold''' 
I want this in bold



With mediawiki markup you only have to type the demonstration once, like this:

{{demo|I want ''this in italic''}}

to get:


You type... You get...
I want ''this in italic'' 
I want this in italic



If your demonstration includes a call to template, include it twice and put the first call inside nowiki's, like this:

{{demo|<nowiki>{{estimate|8h|5h}}</nowiki><!--
-->   |        {{estimate|8h|5h}} }}

To get:


You type... You get...
{{estimate|8h|5h}}    
(estimate 8h, so far 5h)


If you don't use nowiki's, the template will be expanded in the "You type" section.

For clarity the first and second use of the demonstration text are aligned under each other. That way you when you are editing the text, can see that they are character identical. In order to avoid an extra blank line, the line break is commented out with <!-- ... -->.

If you want to include multiple examples in one table, use Template:Demo table.

Personal tools