I am trying to nest one amrita template inside another. The problem I'm
having is that the one that gets nested gets sanitized so that all HTML
tags appear as literals. I thought one approach might be to turn off
sanitizing when I nest templates, but I figured there must be a better
way of doing this. What's the "amrita way" of doing it? Here is some
sample code:
# inner template
t = TemplateText.new <<-EOS
<p>List of messages</p>
<ul id="list">
<li id="msg"></li>
</ul>
EOS
d = Hash.new
d[:list] = Array.new
messages_array.each do |msg|
d[:list] << { :msg => msg }
end
t.expand(msglist, d)
data[:msglist] = msglist
# main template
tmpl.expand(STDOUT, data)
Thanks,
Carl