I'm creating a template in enlive and having trouble with this snippet which produces lazyseq. When I try this sniptest in REPL it produces "clojure.lang.LazySeq@ba6da9f2".
(h/sniptest (template-div)
[:div.Row] (h/content (map #(value-cell %)
(for [e(:data-content msh-contents)]
(vals e)))))
The rest of the code needed to test this looks like this
(require '[net.cgrand.enlive-html :as h])
(def msh-contents {:title "Events mashup",
:data-content [{:title "ICTM Study Group ",
:url "http://some-url.com"}
{:title "Volodja Balzalorsky - Hinko Haas",
:url "http://some- other-url.com"}
]})
(defn template-div[] (h/html-resource "index.html"))
(h/defsnippet value-cell (template-div)
[:div.Row :div.Cell] [value]
(h/content value))
The index.html file looks something like this (it can also be found here http://www.filedropper.com/index_25))
<div class="Table">
<div class="Title">
<p>This is a Table</p>
</div>
<div class="Heading">
<div class="Cell">
<p>Heading 1</p>
</div>
</div>
<div class="Row">
<div class="Cell">
<p>Row 1 Column 1</p>
</div>
</div>
I saw a similar question, but the solution was to use content instead of html-content. Not sure what causes the issue here...