Page 1 of 1

Dragonfly eval-template

Posted: Mon Nov 30, 2009 7:43 pm
by cormullion
I'm experimenting with adding another layer of evaluation locally... using something like eval-template. The idea is to incorporate dynamic newLISP code that converts to HTML that is then subsequently processed through Dragonfly:eval-template (and presumably unevaluated because it's already been evaluated once).

Just wondering about the default selection of

Code: Select all

<% and %>
to mark code sections. I know you can choose different OPEN and CLOSE tags in config.lsp... But are there other character combinations that can be assumed to be absent in typical HTML? Were these chosen for compatibility with other template systems or is it just a good choice for HTML templates? And are their any combinations that wouldn't be suitable in Dragonfly?

Re: Dragonfly eval-template

Posted: Tue Dec 01, 2009 5:07 am
by itistoday
They're commonly used delimiters for template systems because they make use of the angle-brackets, which have a special meaning in HTML (to denote tags). For that reason they're used as the default in Dragonfly as well.

Re: Dragonfly eval-template

Posted: Tue Dec 01, 2009 6:02 pm
by cormullion
gotcha. I think I need to find tags that pass unharmed through the preliminary phase of constructing HTML, eg using a blogging tool such as MarsEdit or Ecto or text formatting tools such as Markdown either. It might be best to find something that means nothing to anybody except eval-template and it's current tags so that it passes through unharmed.