【发布时间】:2016-03-15 16:54:56
【问题描述】:
我需要根据某些条件替换元素的内容。如果条件不满足,则元素应保持不变。
(enlive/deftemplate template (io/resource "templ.html")
[]
[:#el_id] (if (condition)
(enlive/content ...)
;; otherwise identity transformation here
))
我尝试使用nil 作为身份转换,但它只是删除了元素。
【问题讨论】: