Jump to content

Sitemap - subcategory level


Recommended Posts

Hello,

 

I have a small problem and I can't figure it out how to fix it.

I have few levels of subcategories and on the sitemap I want to show only the first 3 levels.

Can someone tell me how to show only the first 3 levels of the subcategories on the sitemap?

 

Link to comment
Share on other sites

  • 1 year later...

Should be this for 3rd level of categories. 1=main 2=main+1 sub 3 = main + 2 subs 4=main + 3 subs

 

$this->context->smarty->assign('categoriesTree', Category::getRootCategory()->recurseLiteCategTree(4));

Hi.

 

Change SitemapController.php line 46 to

$this->context->smarty->assign('categoriesTree', Category::getRootCategory()->recurseLiteCategTree());

Regards.

Robin.

The CartExpert Team

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...