<?php
/**
 * FW Food menu 5.1.1
 * @copyright (C) 2020 Fastw3b
 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
 * @link http://www.fastw3b.net/ Official website
 **/

defined( '_JEXEC' ) or die( 'Restricted access' );

$view = $displayData['view'];
$col_qty = $displayData['col_qty'];
$cat = $displayData['cat'];

$num = 0;

foreach ($cat->_items as $row) {
?>
					<div>
<?php   
    $view->row = $row;
    if (isset($row->type)) {
        $num = 0;
        $view->params = new JFParams($row->params, fwFoodMenuHelper::getParentCategories($row->parent));
        echo fwFoodMenuHelper::loadTemplate('menu.subcategoryitem', array('view'=>$view));
    } else {
        echo fwFoodMenuHelper::loadTemplate('menu.pdf_menuitem', array('view'=>$view));
    }
?>
                    </div>
<?php
    $num++;
}