mirasvit / module-blog

Magento 2 Blog Extension
https://mirasvit.com/magento-2-extensions/blog.html
Open Software License 3.0
68 stars 48 forks source link

Concept of a Default Category #77

Closed Judder closed 6 years ago

Judder commented 7 years ago

Have you thought about the best way to implement a default category, similar to the way the core Magento product catalogue has a root?

The current methods to have fall backs to show content on the homepage, if the post collection is empty aren't particularly great and as we have added extra attributes to Categories, we'd like to be able to show these on the Homepage too

The other problem is using the approach that ResourceModel\Category\Collection uses of getFirstItem on the collection isn't great either, as you can end up with

/blog-url/root-category-url/sub-category-url/post-url.html

when you want

/blog-url/sub-category-url/post-url.html