hi!
i'm currently working on a project where most pages have the same structure: a title and some sections. each section has html content, a category and an image.
i dont want to edit the content of these pages with HtmlEditorField, because if an user doesnt stick to the rules the generated html markup by HtmlEditorField wont work with my css.
i decidet to map a section to a dataObject like this:
class Section extends DataObject {
public static $has_one = array(
'ColPage' => 'ColPage',
'Image' => 'Image'
);
static $db = array(
"Content" => "Text",
"Category" => "Enum('Teaser, Normal')"
);
}
and use DataObjectManager for editing in the cms, which works fine, except that it is quiet annoying that every time i want to edit a section a lightbox pops up, and i cant add an image until i saved the Section, closed it and opened it again.
i tried to do this with TableField (which doesnt have popups but inline editing), but i couldnt get it to work with images (i read somewhere it doesnt work with htmlEditorFields nor ImageFields).
so.. what should i do? stick with the annoying popup of DataObjectManager or use HtmlEditorField which may produce weird markup.
maybe there is a better approach for working with heavily structured pages like that?
thanks in advance