Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jan 23rd, 2011  |  syntax: None  |  size: 0.55 KB  |  hits: 56  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
This paste has a previous version, view the difference. Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. (defsnippet list2 "list.html" [:body :> any-node] [list]
  2.   [:h2.list-title] (content (:title list))
  3.   [:li.step] (clone-for [[type id] (:elements list)]
  4.                         (content
  5.                          (condp = type
  6.                              "step" (:text (get-step id))
  7.                              "list" (list2 (get-list id))
  8.                              type))))
  9.  
  10.  
  11. (defsnippet list1 "list.html" [:body :> any-node] [list]
  12.   [:h2.list-title] (content (:title list1))
  13.   [:li.step] (clone-for [[type id] (:elements list1)]
  14.                         (content
  15.                          (condp = type
  16.                              "step" (:text (get-step id))
  17.                              "list" (list2 (get-list id))
  18.                              type))))