[html-template-devel] Easier way to fill tmpl_var environment?

Sohail Somani sohail at taggedtype.net
Wed Nov 21 06:43:24 UTC 2007


Hi,

First of all, thank you for a nice library.

Now, I have a question. Is there a way to have html-template call back 
into the calling environment so I don't have to pass all slot values of a 
list of objects in as a list?

So instead of:

;;; prints "b c"
(fill-and-print-template "<!-- tmpl_loop ... -->" 
   (list :a (list :b "b" :c "c")))

I can do something like:

;;; prints "b c"
(fill-and-print-template 
  "<!-- tmpl_callback (b-of a) --> <!-- tmpl_callback (c-of a) -->"
  (list :a a))

Where b-of and c-of are readers. It is just very very tedious to make 
lists of all the values.

Does that make any sense?

Thanks for your time.

-- 
Sohail Somani
http://uint32t.blogspot.com




More information about the Html-template-devel mailing list