SS3.1
Back in the DOM days, I had this working, but haven't found a solution in SS3.
How can I hide some fields for MenuPage but show it on MenuPageFamilyMeals without creating two DataObjects?
class MenuItem extends DataObject {
private static $db = array(
'MenuItemName' => 'HTMLVarchar(80)',
'MenuItemDescription' => 'HTMLText',
'FamilyMeal' => 'Enum("Family_Meal,Additional_Family_Meal")'
);
private static $has_one = array(
'MenuPageFamilyMeals' => 'MenuPageFamilyMeals',
'MenuPage' => 'MenuPage'
);
function getCMSFields() {
$fields = parent::getCMSFields();
...
return $fields;
}
}
Thanks