Hello
I'm trying to retrieve the value of a cms field inside a function but it does't work
In code.php
class SomeClassPage extends Page{
static $db = array(
'AutorizedContent' => 'HTMLText',
'ForbidenContent' => 'HTMLText'
);
function getCMSFields(){
$f = parent::getCMSFields();
$f->addFieldToTab('Root.Content.AutorizedContent', new HTMLEditorField('AutorizedContent'));
$f->addFieldToTab('Root.Content.ForbidenContent', new HTMLEditorField('ForbidenContent'));
return $f;
}
then I have
class SomeClassPage_Controller extends Page_Controller{
function Authorise(){
return $this->ForbidenContent;
}
in template
<% if Authorise %> $ForbidenContent<% end_if %>
Any idea
thanks