I have a View displaying the content of a Custom Content Entity.
The first output I created is a Page display (accessible with a path and an option in a menu).
As expected, this is displayed in the 'Content' region of the default theme (see capture below).
I'd like to output the result in a full width region of the theme, i.e. without the content of 'Sidebar First' (User account menu, Search).
I duplicated the Page Display as a Block Display and placed it. But, of course, it appears on every page of the site :-(
So I created a single basic page (node/xx) and I configured the block to show only in this page. But I had to hide 'User account menu' and 'Search' on this page too.
Is there a more simple way to achieve this?
Add a comment
|
1 Answer
You are going about this the wrong way. Start again with a page display for your view.
Now you want to remove the sidebar from that page. Two ways you might do that:
- Disable all blocks in the sidebar when the path matches the one for your view. You'll need to configure each one separately with the path criteria.
- Override the page template with one that does not have the sidebar code. The template will be named something like page--my-path.html.twig (See https://www.drupal.org/docs/8/theming/twig/twig-template-naming-conventions).
There are other approaches but these are probably the simplest to implement.