Thanks David,

As a new clojurian, this is extremely helpful!  I have a question.  In
this function:

(html/deftemplate index "tutorial/template1.html"
  [ctxt]
  [:p#message] #(if-let [msg (or (:message ctxt)
                                 "Nothing to see here!")]
                  ((html/content msg) %)))

Isn't if-let redundant?

Thanks,

Will Groppe


On Mar 14, 2:16 pm, David Nolen <dnolen.li...@gmail.com> wrote:
> I just finished up a fairly involved tour of Enlive. I think that Enlive is
> a truly fantastic library that just needs a little more documentation ;) I
> cover scraping Hacker News and the New York Times as well three templating
> examples that use Compojure. I also show how "template inheritance",
> considered a fancy feature among popular templating solutions, is just
> function composition. And unlike some popular HTML templating DSLs, with
> Enlive you have the full power of your language at your disposal.
>
> http://github.com/swannodette/enlive-tutorial
>
> Feedback appreciated.
>
> David

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to