title: Heist: How do I insert a dynamic list of sub-templates into a template?
body: <p>I am writing a site for online surveys. I have a list of questions that all go on one html page and the list is of unknown length. Each question has the form stored in template <code>qu1.tpl</code> and the page is <code>qu.tpl</code>.  Now I want to:</p>
  
  <ol>
  <li><p>replace some names in <code>qu1.tpl</code> for each question</p></li>
  <li><p>replace some things in <code>qu.tpl</code> once</p></li>
  <li><p>and stick all instantiations of <code>qu1.tpl</code> into <code>qu.tpl</code></p></li>
  </ol>
  
  <p>Using what I learned in the tutorial, I tried to recursively replace a tag <code>&lt;qulist/&gt;</code> with <code>&lt;apply template="qu1.tpl"&gt;&lt;qulist/&gt;</code> in <code>qu.tpl</code> using <code>localHeist</code> and <code>bindString</code> but this cannot work because <code>qu.tpl</code> is already rendered so the newly inserted apply tag doesn't resolve.</p>
  
  <p>what should I do instead?</p>
  
  <p>(I guess this is a more general question. If you can think of other applications the answer applies to, please add text and tags for the search engines.)</p>