Reputation: 4896
Which's the equivalent for
...
import Happstack.Server.Heist
pageHeist :: B.ByteString -> [(T.Text,T.Text)] -> ServerPart Response
kfzPaginaHeist template par = do
pagina <- newTemplateDirectory' "template" $ bindStrings par defaultHeistState
render pagina template
with the new heist api? Also, did the and (or the way you're supposed to load templates) change?
Upvotes: 0
Views: 148
Reputation: 7282
First of all, you probably don't want to call newTemplateDirectory in the ServerPart monad. It should be called when your application starts up. Second, instead of passing it a HeistState, now you pass it a HeistConfig which contains all of your splices.
Upvotes: 2