<ul class="profile-menu">
    <li class="category"><i class="fa fa-folder"></i> <?php echo $view['translator']->trans("Categories"); ?></li>
    <?php
    if ($list) {
        foreach ($list as $value) {
            if ($subCat[$value->getId()] != 0) {
                ?>
                <li><a title="" href="<?php echo $view['router']->generate('view_categories', array('id' => $value->getId(), 'title' => Market\ZodacoBundle\System::_reString($view['translator']->trans($value->getShortTitle()))), true); ?>" <?php if ($category == $value->getId()) { ?>class="active"<?php } ?>><img src="<?php echo $view->escape('/uploads/categories/'); ?><?php echo $value->getSmallIcon(); ?>"  style="width: 24px; min-height: 24px; height: 24px; margin-top: -5px; margin-bottom: 0px;"> <?php echo $view['translator']->trans($value->getTitle()); ?></a></li>
                <?php
                foreach ($subCat[$value->getId()] as $value1) {
                    ?>
                    <li><a title="" href="<?php echo $view['router']->generate('view_categories', array('id' => $value1->getId(), 'title' => Market\ZodacoBundle\System::_reString($view['translator']->trans($value1->getShortTitle()))), true); ?>" <?php if ($category == $value1->getId()) { ?>class="active"<?php } ?>><img src="<?php echo $view->escape('/uploads/categories/'); ?><?php echo $value1->getSmallIcon(); ?>"   style="margin-left: 20px; width: 24px; min-height: 24px; height: 24px; margin-top: -5px; margin-bottom: 0px;"> <?php echo $view['translator']->trans($value1->getTitle()); ?></a></li>
                    <?php
                }
                ?>
                <?php
            }
        }
    }
    ?>
</ul>