Jump to content

[TUTORIAL] Order by name links in footer


Recommended Posts

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(







         $positions = array_column($cmsl, 'title');

         array_multisort($positions, $cmsl);

         return  $cmsl;





Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...