I have this code for Page.php
class Page extends SiteTree {
public static $db = array(
);
public static $has_one = array(
'MenuImg' => 'Image',
'MenuImg2' => 'Image'
);
function getCMSFields()
{
$fields = parent::getCMSFields();
$fields->addFieldToTab("Root.Content.MenuImages", new ImageField('MenuImg','Menu Image'));
$fields->addFieldToTab("Root.Content.MenuImages", new ImageField('MenuImg2','Menu Image Rollover'));
return $fields;
}
}
I only want the "Menu Images" tab to appear in the CMS on pages that are ticked "Show in Menus" is this possible thanks!?