Hi all,

In the past I've often used Leo for creating HTML templates for use with
the HtmlTmpl engine.

But now, for simple sites, I'm looking for the best way to do apply the
templates directly within Leo for non-dynamic content.

Please consider the scenario of wanting to create n instances of a sidebar
block, each with a title and a body.

If coding for HtmlTmpl, I would have something like (excuse the yucky
oversimplified code):

<table class="sidebar_block">
 <tr>
  <td class="sidebar_title">
   <TMPL_VAR blocktitle>
  </td>
  <td class="sidebar_body">
   <TMPL_VAR blockbody>
  </td>
  </tr>
 </table>

But what if I just want to generate a simple static site, and not need to
run a templating engine?

So far, the only way I've thought of to do this would be to have this
sidebar block template cut up into 3 pieces, the piece before the title,
the bit between title and body, and the bit after the body, and have them
appearing as cloned nodes with names like SIDEBLOCK[, ]SIDEBLOCK[ and
]SIDEBLOCK. But this feels ugly to me, because for any template requiring n
values, it would require n+1 cloned nodes.

Is there any way in the newer cuts of Leo to do this more simply and
elegantly?

Cheers
David

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to