Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, Ed, biapar, Willr, Ingo, swaiba

Custom fields - HTMLText


Go to End
Reply


1028 Views

Avatar
estheblessed

Community Member, 3 Posts

23 May 2016 at 5:55am

Hi,

I am trying to add a second content area using the following:

<?php
class Publication extends Page {

private static $db = array (
'SideInfo' => 'HTMLText',
);

public function getCMSFields() {
$fields = parent::getCMSFields();

$fields->addFieldToTab("Root.Content.RightContent", new HTMLEditorField('SideInfo'));

return fields;
}

}
class Publication_Controller extends Page_Controller {
}

But when I try to add a new page of that type, it creates the page but I get the message 'Internal server error'. So I am assuming there is something wrong with that code above ^

Many thanks in advance