I would like to take the following web request handler:

(define (login request)
  (render-string
   (include-template "../views/authentication/login.html")))

and eventually get to something like:

(define (login request)
  (render login))

My current lack of understanding with respect to macros is limiting me :) 
For now, I'd be content with the following:

(define (login request)
  (render-string
   (include-template (view login))))

which I tried to get to work with this macro:

(define-syntax-rule (view name)
  (string-append "../views/authentication/" (symbol->string (quote name)) 
".html"))

But, I'm guessing that the include-template macro is unable to consume the 
output of my view macro. Is there anything I can do to get (view login) to 
be expanded prior to when include-template needs it?

Thanks,
Brian


-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to