Dragonfly eval-template

Started by cormullion, November 30, 2009, 11:43:44 AM

Previous topic - Next topic

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  


<% 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?

itistoday

#1
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.
Get your Objective newLISP groove on.

cormullion

#2
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.