17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 4973 Views |
-
[Solved] Multiple "Content-Areas" in admin interface?

28 May 2008 at 4:47am Last edited: 28 May 2008 7:48am
Is there a solution to provide multiple content - boxes to the one using the admin interface for text editing with the wysiwyg-editor?
The documentation for the fields which can be defined was looking good for the first moment and I was trying with field type "HTMLText" but this one just offers a one line input field for html code.
Any ideas?
Thanks for your help. -
Re: [Solved] Multiple "Content-Areas" in admin interface?

28 May 2008 at 6:51am
You have to add an HTML editor field to the editor too, instead of a TextField in your getCMSFields() method, ie.
$fields->addFieldToTab('Root.Content.Main', new HtmlEditorField('YourFieldName','More content'));
-
Re: [Solved] Multiple "Content-Areas" in admin interface?

28 May 2008 at 7:49am
Thanks a lot.
This hint was the solution.
-
Re: [Solved] Multiple "Content-Areas" in admin interface?

21 October 2008 at 7:47am
This is exactly what I was looking for, thanks!
For anyone who is unsure of where to place this, here is a portion of my 'CareerPage.php' (located within mysite/code):
class CareerPage extends Page {
static $db = array(
'Requirements' => 'HTMLText'
);
static $has_one = array(
);
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab('Root.Content.Main', new HtmlEditorField('Requirements', 'Job Requirements'));
return $fields;
}
}
| 4973 Views | ||
|
Page:
1
|
Go to Top |

