Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I detect if a category has Include in Navigation Menu set to NO?

Tags:

magento

How do I detect if a category has Include in Navigation Menu set to NO?

like image 844
Chris Avatar asked Apr 18 '11 20:04

Chris


2 Answers

include_in_menu is an attribute so you can use,

if (!$category->getIncludeInMenu()) ...
like image 113
clockworkgeek Avatar answered Oct 21 '22 15:10

clockworkgeek


This worked for me

 $category->load();
//$category->getIncludeInMenu() returns 1 if set to yes, returns 0 if set to no
if(!$category->getIncludeInMenu())
...
like image 35
Mahendra Jella Avatar answered Oct 21 '22 16:10

Mahendra Jella