The Walden Effect: Farming, simple living, permaculture, and invention.

templatebody

The templatebody directive is supplied by the [[!iki plugins/templatebody desc=templatebody]] plugin.

This directive allows wiki pages to be used as templates for the template or edittemplate directive, without having [[!cpan HTML::Template]] markup interpreted as wiki markup when that page is built.

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.

The first, un-named parameter is the content of the template. Because templates often contain directives, it's convenient to use the "here-document" syntax for it:

[[!templatebody  <<ENDBODY
[[!meta title="<TMPL_VAR name>"]]
[[!tag  person]]
<dl>
<dt>Name:</dt><dd><TMPL_VAR name></dd>
<dt>Age:</dt><dd><TMPL_VAR age></dd>
</dl>

<TMPL_VAR description>
ENDBODY]]


Anna Hess's books
Want more in-depth information? Browse through our books.

Or explore more posts by date or by subject.

About us: Anna Hess and Mark Hamilton spent over a decade living self-sufficiently in the mountains of Virginia before moving north to start over from scratch in the foothills of Ohio. They've experimented with permaculture, no-till gardening, trailersteading, home-based microbusinesses and much more, writing about their adventures in both blogs and books.



Want to be notified when new comments are posted on this page? Click on the RSS button after you add a comment to subscribe to the comment feed, or simply check the box beside "email replies to me" while writing your comment.






profile counter myspace



Powered by Branchable Wiki Hosting.

Required disclosures:

As an Amazon Associate, I earn a few pennies every time you buy something using one of my affiliate links. Don't worry, though --- I only recommend products I thoroughly stand behind!

Also, this site has Google ads on it. Third party vendors, including Google, use cookies to serve ads based on a user's prior visits to a website. Google's use of advertising cookies enables it and its partners to serve ads to users based on their visit to various sites. You can opt out of personalized advertising by visiting this site.