Silverstripe Version: 4
I’m trying to migrate an existing project into SS.
It’s a one page site with content “blocks” managed by the CMS. I realise it would probably be easier to make all these blocks as part of the home page type/template/layout in the CMS.
That’s not how it was though and this is more an exercise of “I could do this before in the old system, can I do it in SS”.
What I want:
A model/module in the CMS to manage content blocks that is seperate to the idea of a page. I’m pretty sure I can do this from the Lessons series.
A controller for the home page. In here I’ll add css/js and get the data from the above model to make available in the view.
So, super simple…
Currently I’m stuck at the routes, I think. The home page always loads page.ss and skips the controller.
--- Name: routes After: framework/_config/routes#coreroutes --- SilverStripe\Control\Director: rules: '': 'HomePageController'
I was extending PageController with the same result. I’m missing something obvious or doing something dumb, take pity.