ikiwiki/doc/bugs/no_easy_way_to_wrap_HTML_co...

10 lines
729 B
Plaintext
Raw Normal View History

2009-05-11 08:30:16 +02:00
The [[ikiwiki/directive/inline]] directive applies a template to each page-to-be-inlined, but the loop over the pages is in the Perl, not the template itself. This means if I want to wrap a container `<div>` or a `<table>` or whatever around the entire set of inlined pages, I can't do it by just editing the template. In fact, I think the only way to do it without hacking any Perl is with a wrapper template directive, e.g.
\[[!template id="wrapinline" pages="..."]]
with a template definition like
<div id="foo">\[[!inline ... pages="<TMPL_VAR raw_pages>"]]</div>
It would be much more convenient if the loop over pages happened in the template, allowing me to just stick whatever markup I want around the loop.