How do I determine if the value "NO" is included in the "Enabled" category in the "Navigation" menu?

How do I determine if the Include category in the navigation menu is set to NO?

+15
source share
2 answers

include_in_menu is an attribute that you can use,

 if (!$category->getIncludeInMenu()) ... 
+25
source

It worked for me

  $category->load(); //$category->getIncludeInMenu() returns 1 if set to yes, returns 0 if set to no if(!$category->getIncludeInMenu()) ... 
+4
source

Source: https://habr.com/ru/post/905111/


All Articles