The {item_category} TAG returns an array with all the linked Cartegories of an given Item.

-> Since BIGACE 2.4.


  • assign - (required, string) The name of the template variable the value will be assigned to.

  • id - (required, int) The Menu ID to load the Categories for.

  • id - (optional, Item) If ID is not set, the Item MUST be set, to load the Categories for.

  • itemtype - (optional, int) If Itemtype to load Categories for. Default is Menu. => Parameter exists since 2.5.


This example shows how to load the Categories for the current Menu and display some information.

   `<title>`Fetching Categories`</title>`
   {item_category item=$MENU assign="itemCategories"}
   Categories for `<b>`{$MENU->getName()}`</b>`:
   {foreach item="cat" from=$itemCategories}
      `<li>`[ID {$cat->getID()}] - {$cat->getName()} - {$cat->getDescription()}`</li>`

Check if a Menu has the Category with ID 2 assigned:

{item_category item=$MENU assign="itemCategories"}   
  {foreach item="cat" from=$itemCategories}
     {if $cat->getID() == 2} 
        {assign var="category" value="$cat"}

  {if isset($category)}
     Menu has Category "{$category->getName()}" and ID "{$category->getID()}"!
     Menu is not linked to category 2 :(