You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the CMS module, and have a more or less standard website with some topnavigation etc. If I use this search functionality, the search results page is not able to show $Menu etc. because SearchResults extends Controller and not ContentController .
I'd like to know if its correct I'd have to fork this module and set the SearchResults class to extend ContentController, to have it suit my needs?
Is there another way I can achieve access to "normal" ContentController functionality (such as navigation) without changing the module?
The text was updated successfully, but these errors were encountered:
It is a bit of a pain I will admit, I wanted this to be a module that could be used "framework only" meaning that it could not extend ContentController (it has to extend Controller).
At the moment I get around the issue you describe by using Middleman (https://github.com/i-lateral/silverstripe-middleman). It is not an ideal solution, but I have not been able to come up with a better one for now.
Otherwise your options would be:
As you suggest, fork this module and alter it
Add an extension to the "SearchResults" controller that re-adds these functions (this is basically what Middleman does).
I'm using the CMS module, and have a more or less standard website with some topnavigation etc. If I use this search functionality, the search results page is not able to show $Menu etc. because
SearchResults
extendsController
and notContentController
.I'd like to know if its correct I'd have to fork this module and set the SearchResults class to extend ContentController, to have it suit my needs?
Is there another way I can achieve access to "normal" ContentController functionality (such as navigation) without changing the module?
The text was updated successfully, but these errors were encountered: