This module splits pages into reusable sections that can used across multiple pages.
Composer is the recommended way of installing SilverStripe modules.
composer require plato-creative/silverstripe-sections 1.*
For each section type, you can define additional styles in your config.yml.
LinkSection:
  styles:
    - Layout1
    - Layout2This will provide optional classes for each section type to choose from in the CMS.
Below is the template hierarchy.
- SectionType_PageType_Style.ss e.g. LinkSection_HomePage_Tiles.ss
- SectionType_Style.ss e.g. LinkSection_Tiles.ss
- SectionType_PageType.ss e.g. BannerSection_HomePage.ss
- SectionType.ss e.g. GallerySection.ss
You can limit or completely exclude sections from a page type by defining it in your config.yml You can also setup Pages to have preset sections and decide if you want the sections to be shared across pages.
HomePage:
  section_options:
    BreadcrumbSection:
      limit: 0 # excluded from HomePage
    ContentSection:
      limit: 1 # Only 1 can ever be addedYou can also setup Pages to have preset sections and decide if you want the sections to be shared across pages.
FormPage:
  section_options:
    FormSection:
      presets:
        'Home Page Form': 'shared' # section is shared across home pages
        'Another Form': 'not-shared' # section is not shared across home pages