5099 Posts in 1519 Topics by 1116 members
|Go to End|
18 March 2009 at 11:16pm Last edited: 20 March 2009 11:03am
is it possible to group SelectionGroups in CMS or make a label for a SelectionGroup?
I have 2 SelectionGroups to chose options for has_many images: GalerieLayout and GalerieDisplayMode
The SelectionGroups are displaying in my tab like this:
And what i want is this:
Layout ((one SelectionGroup))
Display ((other SelectionGroup))
any ideas or hints?
thanks in advance,
new SelectionGroup('GalerieLayout', array(
"rows//Rows (Standard)" => new HiddenField(""),
"columns//Columns" => new HiddenField("")
new SelectionGroup('GalerieDisplayMode', array(
"gallerific//Gallerific (Standard)" => new HiddenField(""),
"lightbox//Lightbox" => new HiddenField("")
20 March 2009 at 4:56am Last edited: 20 March 2009 4:58am
I don't have any experience with selectiongroups, so I checked the API and the file in sapphire/forms/SelectionGroup.php.
As far as I understand it, there is no way to display the $name of the selectiongroup right now (in your setup it would be GallerieLayout and GallerieDisplayMode). However... there is a workaround (add it above your Layout-selectiongroup and add another one above your Display-selectiongroup)
$fields->addFieldToTab('Root.Content.GallerieSettings', new LiteralField(
"<p style='font-size:11px; color:#444'>Layout</p>"
The HTML-tags are just in there to show you can do almost anything inside a LiteralField (even adding <img>-tags).
20 March 2009 at 10:57am
Great! That will do it. And it's much more flexible...
|Go to Top|