0

In the Magento admin site. I go to Manage Sliders > Choose to edit some banner > click show banner list

How can I sort the banner list with each Sort Order?

Actually, When it shows on the real website, it shows by I sorted.

But in the list of the banner, it sorts by an ID created from Magento.

I need to sort the banner using sort order.

enter image description here

1 Answer 1

0

Find you collection file and You can try something like below

$bannerColletion = $this->_bannerFactory->getCollection();
$bannerColletion ->setOrder('position','ASC');

setOrder is use for sorting

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.