21293 Posts in 5733 Topics by 2602 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 777 Views |
-
Structured Content with TableField

22 July 2009 at 2:26am
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
-
Re: Structured Content with TableField

22 July 2009 at 5:07am
Can't you just create a extendend pageclass and add more fields to that pagetype?
-
Re: Structured Content with TableField

22 July 2009 at 8:40pm
no, because i dont want the number of fields to be predefined.
another possible solution i thought of would be to customize htmlEditor (TinyMCE) in a way so it keeps the structure, but i dont know yet how to do this per Page.
-
Re: Structured Content with TableField

27 July 2009 at 9:18pm
noone got an idea?
it don't think it is uncommon to structure your content?
help pls!
| 777 Views | ||
|
Page:
1
|
Go to Top |


