Add :partial option to renderer
This commit is contained in:
parent
e4b7303d5b
commit
d7f5a39fc8
1 changed files with 13 additions and 11 deletions
|
@ -24,14 +24,16 @@
|
|||
|
||||
(defmethod jingle:process-response ((app jingle:app) result)
|
||||
(set-response-header :content-type "text/html; charset=utf-8")
|
||||
(call-next-method app
|
||||
(hsx:render-to-string
|
||||
(match result
|
||||
((plist :body body
|
||||
:metadata metadata
|
||||
:cache cache)
|
||||
(progn
|
||||
(set-cache-control cache)
|
||||
(~layout :metadata metadata
|
||||
body)))
|
||||
(_ (error "Invalid response form"))))))
|
||||
(match result
|
||||
((plist :body body
|
||||
:metadata metadata
|
||||
:cache cache
|
||||
:partial partial)
|
||||
(set-cache-control cache)
|
||||
(call-next-method app
|
||||
(hsx:render-to-string
|
||||
(if partial
|
||||
body
|
||||
(~layout :metadata metadata
|
||||
body)))))
|
||||
(_ (error "Invalid response form"))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue