umimood/silverstripe-multi-sitetree

Provides Multi SiteTree sections in SilverStripe CMS

Installs: 4

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:silverstripe-vendormodule

dev-master / 1.0.x-dev 2020-02-09 07:57 UTC

This package is auto-updated.

Last update: 2024-06-09 18:11:24 UTC


README

Build Status

Module provides ability to create multiple site tree sections to divide content pages based on class type.

Requirement

  1. silverstripe/cms ^4.3
  2. php ^7

Installation

composer require umimood/silverstripe-multi-sitetree

TODO

  1. Better code coverage
  2. Ability to filter by namespace

Usage

1. Extend the base classes

  1. CMSPagesController
  2. CMSPageAddController
  3. CMSPageEditController
  4. CMSPageHistoryViewerController
  5. CMSPageSettingsController
class CMSEmailsController extends \UmiMood\MultiSiteTree\Controllers\CMSPagesController
{
}
class CMSEmailAddController extends \UmiMood\MultiSiteTree\Controllers\CMSPageAddController
{
}
class CMSEmailEditController extends \UmiMood\MultiSiteTree\Controllers\CMSPageEditController
{
}
class CMSEmailHistoryViewerController extends \UmiMood\MultiSiteTree\Controllers\CMSPageHistoryViewerController
{
}
class CMSEmailSettingsController extends \UmiMood\MultiSiteTree\Controllers\CMSPageSettingsController
{
}

2. Define configuration in config.yml

# Multi site tree section configuration
App\CMSEmailsController:
  family_controller: App\CMSEmailsController
  menu_priority: 26
  url_segment: emails
  menu_title: Emails
  classes:
    - App\EmailEvent
    - Some\Other\EmailEvent
    - And\Another\EmailEvent

App\CMSEmailAddController:
  family_controller: App\CMSEmailsController
  url_segment: emails/add
  menu_title: Emails

App\CMSEmailEditController:
  family_controller: App\CMSEmailsController
  url_segment: emails/edit
  menu_title: Emails

App\CMSEmailHistoryViewerController:
  family_controller: App\CMSEmailsController
  url_segment: emails/history
  menu_title: Emails

App\CMSEmailSettingsController:
  family_controller: App\CMSEmailsController
  url_segment: emails/settings
  menu_title: Emails

Note: Sub class of UmiMood\MultiSiteTree\Controllers\CMSPagesController is parent controller (identifier) and needs to be assigned to all five (5) controller classes.

Maintainer

Umair Mahmood umair.mahmood22@gmail.com

Bugtracker

Bugs are tracked in the issues section of this repository. Before submitting an issue please read over existing issues to ensure yours is unique.

If the issue does look like a new bug:

  • Create a new issue
  • Describe the steps required to reproduce your issue, and the expected outcome. Unit tests, screenshots and screencasts can help here.
  • Describe your environment as detailed as possible: SilverStripe version, Browser, PHP version, Operating System, any installed SilverStripe modules.

Please report security issues to the module maintainers directly. Please don't file security issues in the bugtracker.

Development and contribution

If you would like to make contributions to the module please ensure you raise a pull request and discuss with the module maintainers.