Vorlage:Rawinclude: Unterschied zwischen den Versionen

Aus Stratum 0
Wechseln zu:Navigation, Suche
(y u no english)
K (less empty paragraphs)
 
(8 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 12: Zeile 12:
 
<pre><nowiki>{{rawinclude|RepRap/Slicer/Configs/larsan.ini|larsan.ini|fold=y}}</nowiki></pre>
 
<pre><nowiki>{{rawinclude|RepRap/Slicer/Configs/larsan.ini|larsan.ini|fold=y}}</nowiki></pre>
  
{{rawinclude|RepRap/Slicer/Configs/larsan.ini|larsan.ini|fold=y}}
+
{{rawinclude|RepRap/Configs/Slic3r/larsan.ini|larsan.ini|fold=y}}</noinclude><includeonly><!--
</noinclude>
+
-->{{#if:{{{{1|}}}||<span class="error">Error: <nowiki>{{rawinclude}}</nowiki> needs at least 1 parameter.</span>}}<!--
<includeonly>
 
{{#if:{{{{1|}}}||<span class="error">Error: <nowiki>{{rawinclude}}</nowiki> needs at least 1 parameter.</span>}}<!--
 
  
--><div class="rawinclude-header"><span class="icon">[[File:Icon text-x-generic.png|24px|link=]]</span> <span class="title"><em>{{{title|{{{2|asdfasdfasdfasdf{{FULLPAGENAME:{{{1}}}}}}}}}}}</em></span> <span class="link">([{{SERVER}}{{SCRIPTPATH}}/index.php?action=raw&title={{{1}}} Download])</span></div>
+
--><div class="rawinclude-header"><span class="icon">[[File:Icon text-x-generic.png|24px|link=]]</span> <span class="title"><em>{{{title|{{{2|{{FULLPAGENAME:{{{1}}}}}}}}}}}</em></span> <span class="link">([{{SERVER}}{{SCRIPTPATH}}/index.php?action=raw&title={{{1}}} Download])</span></div><!--
<pre style="margin-top:0px;" {{#if:{{{fold|}}}| class="fold"|}}>{{msgnw:{{{1}}}}}</pre></includeonly>
+
-->{{#if:{{{fold|}}}|<!--
 +
  -->{{#tag:pre|{{#tag:nowiki|{{:{{{1}}}}}}}|style="margin-top:0px;"|class="fold"}}<!--
 +
-->|<!--
 +
  -->{{#tag:pre|{{#tag:nowiki|{{:{{{1}}}}}}}|style="margin-top:0px;"}}<!--
 +
-->}}</includeonly>

Aktuelle Version vom 12. Oktober 2014, 23:53 Uhr

Includes a wiki page inside a <pre> environment, and adds a download link to the source of the page.

Usage:

{{rawinclude|''pagename''}}

Further parameters:

title
What is shown in the download link, can be given as second anonymous parameter too.
fold
If set, the <pre> environment is constrained to a height of 200px, and a vertical scrollbar is added when neccessary.

Example:

{{rawinclude|RepRap/Slicer/Configs/larsan.ini|larsan.ini|fold=y}}
Icon text-x-generic.png larsan.ini (Download)
[[:RepRap/Configs/Slic3r/larsan.ini]]