Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usage with CMS #9

Open
sanderha opened this issue Mar 2, 2017 · 1 comment
Open

Usage with CMS #9

sanderha opened this issue Mar 2, 2017 · 1 comment

Comments

@sanderha
Copy link

sanderha commented Mar 2, 2017

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?

@mlewis-everley
Copy link
Member

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants