shacker Posted February 10 Share Posted February 10 Sometimes you need to sort alphabetically the links in your store. With this trick, you can do Edit the file LinkBlockPressenter.php located in in modules/ps_linklist/src/Presenter private function makeLinks($content, $custom_content) { $cmsLinks = $productLinks = $staticsLinks = $customLinks = $categoryLinks = []; if (isset($content['cms'])) { $cmsLinks = $this->makeCmsLinks($content['cms']); } if (isset($content['product'])) { $productLinks = $this->makeProductLinks($content['product']); } if (isset($content['static'])) { $staticsLinks = $this->makeStaticLinks($content['static']); } if (isset($content['category'])) { $categoryLinks = $this->makeCategoryLinks($content['category']); } $customLinks = $this->makeCustomLinks($custom_content); $cmsl= array_merge( $cmsLinks, $productLinks, $staticsLinks, $customLinks, $categoryLinks ); $positions = array_column($cmsl, 'title'); array_multisort($positions, $cmsl); return $cmsl; } https://catalogo-onlinersi.net/en/content/55-sort-prestashop-links-in-footer Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now