We are working on a Silverstripe project that uses the Elemental Module to layout content.
The project also uses the Blog Module with the blog being used for two sections of the website - the work portfolio & a standard blog.
The challenge is: we want different content behaviour for each blog/section:
- Portfolio - Element Blocks
- Blog - standard blog/page behaviour
What is the best way to achieve this?
Should we extend Blog
& BlogPost
to new objects Portfolio
& PortfolioItem
to separate out the two different behaviours?
Or can we just add the following to the Blog Object/Controller:
if ($this->BlogType == 'portfolio'){
// enable Elemental
} else {
// disable Elemental
}
And finally, how do we disable Elemental on specific Pages? It isn't obvious in the documentation.