Difference between revisions of "Template:Tutorial"

From ONELAB
Jump to: navigation, search
Line 1: Line 1:
<includeonly>
 
 
 
<!--  
 
<!--  
 
   we cannot use xml tags directly for the "include" extension because it prevents  
 
   we cannot use xml tags directly for the "include" extension because it prevents  
Line 6: Line 4:
 
-->
 
-->
  
{{#if: {{{height|}}} |
+
<includeonly>
<div style="margin:.3em 0 1em; overflow:auto; height:{{{height|20em}}}; width:{{{width|100%}}};
+
{{#if: {{{height|}}} | <div style="margin:.3em 0 1em; overflow:auto; height:{{{height|20em}}};  
            -moz-border-radius-topleft:0.5em; border:1px solid #AAA; padding-left:0.5em;  
+
                                  width:{{{width|100%}}}; -moz-border-radius-topleft:0.5em;
            background:transparent;">
+
                                  border:1px solid #AAA; padding-left:0.5em; background:transparent;"> }}
}}
+
{{#tag:include||src="/onelab_files/{{{1}}}"|highlight="CPP"}}
  {{#tag:include||src="/onelab_files/{{{1}}}"|highlight="CPP"}}
+
{{#if: {{{height|}}} | </div>}}
 
 
{{#if: {{{height|}}} |
 
</div>
 
}}
 
 
 
 
[http://ace.montefiore.ulg.ac.be/onelab_files/{{{1}}} Direct link to file `{{{1}}}' ]
 
[http://ace.montefiore.ulg.ac.be/onelab_files/{{{1}}} Direct link to file `{{{1}}}' ]
 
 
</includeonly>
 
</includeonly>
 
 
<noinclude>
 
<noinclude>
  
Line 27: Line 18:
 
Ce template permet d'inclure simplement un fichier de tutorial pour onelab
 
Ce template permet d'inclure simplement un fichier de tutorial pour onelab
  
Utilisation:
+
Afficher le fichier complet:
  
 
<pre>
 
<pre>
 
{{tutorial|nom_de_fichier}}
 
{{tutorial|nom_de_fichier}}
 +
</pre>
 +
 +
Afficher seulement une partie:
 +
<pre>
 +
{{tutorial|nom_de_fichier|height=22em}}
 
</pre>
 
</pre>
  
 
</noinclude>
 
</noinclude>

Revision as of 23:43, 20 March 2011



Help

Ce template permet d'inclure simplement un fichier de tutorial pour onelab

Afficher le fichier complet:

{{tutorial|nom_de_fichier}}

Afficher seulement une partie:

{{tutorial|nom_de_fichier|height=22em}}