silverstripe / silverstripe-cms

Silverstripe CMS - this is a module for Silverstripe Framework rather than a standalone app. Use https://github.com/silverstripe/silverstripe-installer/ to set this up.
http://silverstripe.org/
BSD 3-Clause "New" or "Revised" License
514 stars 333 forks source link

Refactor `ContentController` to be generic #2953

Open GuySartorelli opened 5 months ago

GuySartorelli commented 5 months ago

ContentController is currently hardcoded to work with SiteTree. It's not uncommon to want to route to a DataObject that isn't managed in the site tree, and therefore isn't a SiteTree object - but for the frontend to treat it the same way it treats SiteTree objects.

Making this class more generic removes some friction from that use case.

Acceptance Criteria

TO DECIDE

Arguably this doesn't open much opportunity if we don't move some stuff around as well - but what should we move, and to where?