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.
On Wed, 21 Nov 2007 06:43:24 +0000 (UTC), Sohail Somani sohail@taggedtype.net wrote:
First of all, thank you for a nice library.
You're welcome... :)
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?
Not for me. The design goal of HTML-TEMPLATE is to be as simple as possible - the idea is that the people working on the HTML don't have to learn yet another programming language.
I don't understand why you can't achieve what you want within Lisp, something like
(fill-and-print-template "<!-- tmpl_loop ... -->" (my-function a))
where MY-FUNCTION builds and returns the structure you need.
Edi.
On Thu, 22 Nov 2007 18:30:44 +0100, Edi Weitz wrote:
Not for me. The design goal of HTML-TEMPLATE is to be as simple as possible - the idea is that the people working on the HTML don't have to learn yet another programming language.
I don't understand why you can't achieve what you want within Lisp, something like
(fill-and-print-template "<!-- tmpl_loop ... -->" (my-function a))
where MY-FUNCTION builds and returns the structure you need.
Yes, you are right. That is what I ended up doing anyway. I have this nagging feeling that my-function should be generated somehow.
html-template-devel@common-lisp.net