Jump to content

How to list all product groups in footer


BabaVoss

Recommended Posts

Hi, I would like to list all of my product groups in the footer (common to all pages) and when the user clicks on a group, it will redirect to respective product group page. 

This is what I've managed to do so far:

<ul class="list-unstyled text-left">
  {foreach $productGroups as $productGroup}
     <li class="my-2">
        <a href="{$productGroup->getRoutePath()}" class="footer-item">{$productGroup->name}</a>
     </li>
  {/foreach}
</ul>

This is working fine for the homepage, but fails on other pages. No data is being shown in any other page. Is there any improved method to do this?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated