Hi,
I'm trying to get a list of images rendered inside of a Heist
template. My best attempt so far is:
cellsSplice :: Splice Application
cellsSplice = do
liftIO $ putStrLn "hi" -- make sure we invoke this Splice
return $ map cellify ["a", "b", "c"]
where
cellify type_ = X.Element "td" [] $ [X.Element "div" [("id",
"type")] $ [X.Element "img" [("src", pack $ "/img/" ++ type_),
("width", "200"), ("height", "100")] $ [X.TextNode $ pack type_]]]
When embedding this into the index.tpl of my application via a <cells/
> tag, it returns an empty response:
cristipp$ wget http://localhost:8000/
--2011-02-21 22:47:13-- http://localhost:8000/
Connecting to localhost (localhost)|127.0.0.1|:8000... connected.
HTTP request sent, awaiting response... No data received.
Retrying.
If I change X.Element "img" into X.Element "div" the code works fine
and returns a proper HTML page. This is quite puzzling, I would have
expected the content of the X.Element argument to be reproduced
verbatim at the output, not to cause the response to be silently
dropped!
There may be some other problem, but I don't know where to start
diagnosing. There is no error logged on stdout/stderr. Any help is
greatly appreciated!
Thank you,
Cristian
_______________________________________________
Snap mailing list
[email protected]
http://mailman-mail5.webfaction.com/listinfo/snap