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.
Form fields for filtering in CMSMain are hardcoded - and some of the functionality is duplicated or else needlessly different between this filter functionality and GridFieldFilterHeader.
original POC PR - this PR includes many additional notes and implementation details
Acceptance Criteria
The fields to use for filtering are pulled from the model in the same way GridFieldFilterHeader does (i.e. it uses searchableFields())
SearchContext is used for filtering in CMSMain the same way it is in GridFieldFilterHeader
Any CMSSiteTreeFilter logic is either made generic if possible, or else used by the SearchContext for SiteTree wherever filtering pages is used
i.e. filtering pages in a gridfield uses the same logic as filtering pages in CMSMain
A shared template and shared javascript/css are used for the filter in GridFieldFilter and CMSMain (with the ability to use different custom templates as desired - e.g. by trying to get specific templates by class name first, and falling back to the shared one)
As much as feasible, PHP logic for filtering in GridFieldFilterHeader and CMSMain is shared
Form fields for filtering in
CMSMain
are hardcoded - and some of the functionality is duplicated or else needlessly different between this filter functionality andGridFieldFilterHeader
.Relevant
Acceptance Criteria
GridFieldFilterHeader
does (i.e. it usessearchableFields()
)SearchContext
is used for filtering inCMSMain
the same way it is inGridFieldFilterHeader
CMSSiteTreeFilter
logic is either made generic if possible, or else used by theSearchContext
forSiteTree
wherever filtering pages is usedCMSMain
GridFieldFilter
andCMSMain
(with the ability to use different custom templates as desired - e.g. by trying to get specific templates by class name first, and falling back to the shared one)GridFieldFilterHeader
andCMSMain
is shared