Hello-- I have a recurring situation where I want to keep the first item in an unordered list (to clone-for with) and delete the rest (which merely serve as sample data in my template).
e.g., If I have this:
<ul>
<li>thing</li>
<li>thing2</li>
<li>thing3></li>
</ul>
I want:
<ul>
<li>thing</li>
</ul>
My snippet will do something like this:
(defsnippet mysnippet "path/to/template.html" ["#container"]
[things]
[(enfocus.enlive.syntax/but ":ul > *:first-child)] (remove-node)
[":ul > *:first-child] (clone-for [thing things] (content thing))
Unfortunately, that doesn't work. enfocus.enlive.syntax/but doesn't seem to select "all, but".
Any help is greatly appreciated.
Thanks!