d6y/lift-cookbook — Issue #11: Loop over a collection using the same template for each item.
Author: d6y
Created: 2012-03-07 20:17:32+00:00
State: open
Labels: to write

Problem: you have a list you want to display, using the same HTML template for each item in the list.

Solution:

.fields" #> (".label *" #> List("Cat", "Dog"))

for

```scala

Field Label

```

(or see wiki entry for example to use)

Discussion

Show case for label and description as per mailing list discussion.

See also:

http://groups.google.com/group/liftweb/browse_thread/thread/62d84c002161fc3/8a36a3ded9312270?lnk=gst&q=Binding+via+CSS+Selectors+and+iteration#8a36a3ded9312270

http://www.assembla.com/spaces/liftweb/wiki/Binding_via_CSS_Selectors