magefan / module-blog

Magento 2 Blog Extension is a solution that helps you to create a blog on Magento and manage posts,categories, tags, authors, and comments.
https://magefan.com/magento2-blog-extension
Other
263 stars 135 forks source link

Position / sorting of categories #183

Closed DePalmo closed 4 years ago

DePalmo commented 6 years ago

Hello,

Some time ago I dropped you an email about sorting of categories and that it does not work correctly. You then responded that "Position" uses a DESC when sorting categories, but that does not feel natural, I would expect that position 1 is higher than position 5, but in your extension this is reversed, so position 5 will be higher than position 1. At that time I already proposed a solution to change the code in Magefan\Blog\Block\Sidebar\Categories::getGroupedChilds and update line 57 with ->setOrder('position', 'ASC'), but now when I upgraded your extension to latest version, I see that this change was still not applied.

Since other extensions too use the "position" and it does work as I described it, would you consider to add the mentioned change into your next release?

Or am I (and others) understand "position" wrongly?

DePalmo commented 6 years ago

BTW, "position" that is set per post is being ignored, posts are always sorted by "created date" DESC.

magefan commented 4 years ago

This is fixed in the latest versions. Additionally Magento Blog Extra has the option to define post position inside each category