Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-release > by-pkgid > d8544620e4ac7bee48ddb48c85d55709 > files > 133

ikiwiki-3.20190228-1.mga7.noarch.rpm

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>templatebody</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />

<link rel="stylesheet" href="../../style.css" type="text/css" />

<link rel="stylesheet" href="../../local.css" type="text/css" />






<meta name="robots" content="noindex, follow" />



</head>
<body>

<div class="page">

<div class="pageheader">
<div class="header">
<span>
<span class="parentlinks">

<a href="../../index.html">ikiwiki</a>/ 

<a href="../../ikiwiki.html">ikiwiki</a>/ 

<a href="../directive.html">directive</a>/ 

</span>
<span class="title">
templatebody

</span>
</span>



</div>









</div>





<div id="pagebody">

<div id="content" role="main">
<p>The <code>templatebody</code> directive is supplied by the
<a href="http://ikiwiki.info/plugins/templatebody/">templatebody</a> plugin.</p>

<p>This directive allows wiki pages to be used as templates
for the <a href="./template.html">template</a> or <a href="./edittemplate.html">edittemplate</a> directive, without having
<a href="http://search.cpan.org/search?mode=dist&amp;query=HTML%3A%3ATemplate">HTML::Template</a> markup interpreted as wiki markup when that
page is built.</p>

<p>This directive does not produce any output in the wiki page that
defines the template; the rest of that page can be used to to document
how to use the template.</p>

<p>The first, un-named parameter is the content of the template.
Because templates often contain <a href="../directive.html">directives</a>, it's
convenient to use the "here-document" syntax for it:</p>

<pre><code>[[!templatebody  &lt;&lt;ENDBODY
[[!meta title="&lt;TMPL_VAR name&gt;"]]
[[!tag  person]]
&lt;dl&gt;
&lt;dt&gt;Name:&lt;/dt&gt;&lt;dd&gt;&lt;TMPL_VAR name&gt;&lt;/dd&gt;
&lt;dt&gt;Age:&lt;/dt&gt;&lt;dd&gt;&lt;TMPL_VAR age&gt;&lt;/dd&gt;
&lt;/dl&gt;

&lt;TMPL_VAR description&gt;
ENDBODY]]
</code></pre>

</div>







</div>

<div id="footer" class="pagefooter" role="contentinfo">

<div id="pageinfo">






<div id="backlinks">
Links:

<a href="./edittemplate.html">edittemplate</a>

<a href="../../plugins/templatebody.html">plugins/templatebody</a>

<a href="../../plugins/write.html">plugins/write</a>

<a href="./template.html">template</a>


</div>






<div class="pagedate">
Last edited <span class="date">Tue Feb 26 23:01:54 2019</span>
<!-- Created <span class="date">Tue Feb 26 23:01:54 2019</span> -->
</div>

</div>


<!-- from ikiwiki -->
</div>

</div>

</body>
</html>