widget documentation
[catagits/Reaction.git] / lib / Reaction / UI / Widget / Field / Collection.pm
index 6f59532..c54f8a6 100644 (file)
@@ -27,10 +27,13 @@ __END__;
 
 =head1 NAME
 
-Reaction::UI::Widget::Field::Collection
+Reaction::UI::Widget::Field::Collection - A field representing a collection
 
 =head1 DESCRIPTION
 
+This field class will render a collection of values found in the viewport's
+C<value_names> and localised before passed to the layout.
+
 =head1 FRAGMENTS
 
 =head2 widget
@@ -49,6 +52,51 @@ renders fragment item over the viewport's C<value_names>
 
 C<content> contains the value of the current item ($_ / $_{_})
 
+=head1 LAYOUT SETS
+
+=head2 base
+
+  share/skin/base/layout/field/collection.tt
+
+The following layouts are provided:
+
+=over 4
+
+=item widget
+
+Renders the C<label_box> and C<list> fragments.
+
+=item label_box
+
+Renders a C<span> element containing the C<label> argument.
+
+=item list
+
+Renders the C<item>s inside a C<div> and C<ul> element.
+
+=item item
+
+Renders the C<name> argument inside a C<li> element.
+
+=back
+
+=head2 default
+
+  share/skin/default/layout/field/collection.tt
+
+This layout set extends the C<NEXT> one in the parent skin.
+
+The following layouts are provided:
+
+=over 4
+
+=item label_box
+
+The same as in the C<base> skin, except the label is surrounded by
+a C<strong> element.
+
+=back
+
 =head1 AUTHORS
 
 See L<Reaction::Class> for authors.