public function SetupFields() { $this->CreateTable('cms'); $this->AddField('cms_id', 'cms_id', 'cms', 'Page ID', itTEXT); $this->AddField('parent', 'parent', 'cms'); $this->AddField('title', 'title', 'cms', 'Page Title', itTEXT); $this->AddField('nav_text', 'nav_text', 'cms', 'Menu Title', itTEXT); $templates = utopia::GetTemplates(true); $this->AddField('template', 'template', 'cms', 'Template', itCOMBO, $templates); $this->AddField('position', 'position', 'cms'); $this->AddField('hide', 'hide', 'cms', 'Hide from Menus', itYESNO); $this->AddField('noindex', 'noindex', 'cms', 'noindex', itCHECKBOX); $this->AddField('nofollow', 'nofollow', 'cms', 'nofollow', itCHECKBOX); $this->FieldStyles_Set('title', array('width' => '100%')); $this->AddField('description', 'description', 'cms', 'Meta Description', itTEXT); $this->FieldStyles_Set('description', array('width' => '100%')); $this->AddField('publishing', array($this, 'publishLinks'), 'cms'); $this->AddField('content', 'content', 'cms', 'Page Content', itHTML); $this->fields['content']['attr']['contenteditable'] = 'true'; // $this->AddPreProcessCallback('content',array($this,'processWidget')); $this->FieldStyles_Set('content', array('width' => '100%')); $this->AddField('content_published', 'content_published', 'cms'); $this->AddField('content_time', 'content_time', 'cms'); $this->AddField('content_published_time', 'content_published_time', 'cms'); $this->AddField('is_published', 'is_published', 'cms'); $this->AddFilter('cms_id', ctEQ); }