diff --git a/src/Page/RecipeCategoryPage.php b/src/Page/RecipeCategoryPage.php index 793291a..d4973b0 100644 --- a/src/Page/RecipeCategoryPage.php +++ b/src/Page/RecipeCategoryPage.php @@ -70,6 +70,10 @@ public function getCMSFields(): FieldList ->setTitle(_t(__CLASS__ . '.RecipesPerPage', 'Recipes Per Page')), 'Content' ); + + $fields->dataFieldByName('Content') + ->setTitle('Summary') + ->setRows(5); }); $fields = parent::getCMSFields(); diff --git a/src/Page/RecipeLanding.php b/src/Page/RecipeLanding.php index 5632279..66cfa39 100644 --- a/src/Page/RecipeLanding.php +++ b/src/Page/RecipeLanding.php @@ -72,6 +72,10 @@ class RecipeLanding extends \Page public function getCMSFields(): FieldList { $this->beforeUpdateCMSFields(function (FieldList $fields) { + $fields->dataFieldByName('Content') + ->setTitle('Summary') + ->setRows(5); + if ($this->ID) { $config = GridFieldConfig_RelationEditor::create() ->addComponent(new GridFieldOrderableRows('SortOrder')) diff --git a/src/Page/RecipePage.php b/src/Page/RecipePage.php index 703ec81..feec9bf 100644 --- a/src/Page/RecipePage.php +++ b/src/Page/RecipePage.php @@ -100,6 +100,16 @@ class RecipePage extends \Page 'Image', ]; + /** + * @var array + * @config + */ + private static $cascade_duplicates = [ + 'Image', + 'Ingredients', + 'Directions', + ]; + /** * @var array */ diff --git a/templates/Dynamic/RecipeBook/Page/Layout/RecipeCategoryPage.ss b/templates/Dynamic/RecipeBook/Page/Layout/RecipeCategoryPage.ss index 1c38a3a..546c64f 100644 --- a/templates/Dynamic/RecipeBook/Page/Layout/RecipeCategoryPage.ss +++ b/templates/Dynamic/RecipeBook/Page/Layout/RecipeCategoryPage.ss @@ -1,83 +1,72 @@ -