{* *}{strip} {* *} {$items = FALSE} {if !empty($category)} {if !empty($category->subcategories)} {$items = $category->subcategories} {elseif count($category->path) == 1} {$items = $categories} {else} {$item = end($category->path)} {$item = prev($category->path)} {$items = $categories_list[$item->category_id]->subcategories} {/if} {/if} {* *} {if !empty($items)} {$currentId = $category->category_id|default:0}