https://kotlinlang.org logo
#ktor
Title
# ktor
d

dierre

07/02/2023, 6:17 PM
Hi all, do you know if it's possible to use partial templates with
Mustache
? I found only this page in the documentation but doesn't offer much information besides that fact that you need to use
MustacheContent
thanks.
d

dierre

07/04/2023, 5:43 AM
Hi Philip thanks for the link, but how do I register partials on Ktor? I can only see the function
MustacheContent
.
h

hfhbd

07/04/2023, 8:20 AM
Which function
MustacheContent
do you mean?
Bildschirmfoto 2023-07-04 um 10.19.57.png
untitled.zip
d

dierre

07/04/2023, 5:31 PM
Thanks for the example. I mean the one in the link I put in the first message.
They use the function
MustacheContent
to render a template, I didn’t know I could use
renderTemplate
this way
h

hfhbd

07/04/2023, 5:36 PM
Well, if you look at the sources of respondTemplate, it just calls the constructor MustacheContent, so you can use both.
Just a matter of style
👍 1
d

dierre

07/05/2023, 12:07 PM
works well thanks!
🎉 1