foreach ($dbCategories->db as $key=>$fields) {
$count = count($fields['list']);
if (!$this->getValue('hideCero') || $count>0) {
$html .= '<a class="menu-item" href="'.DOMAIN_CATEGORIES.$key.'">';
$html .= $fields['name'];
$html .= ' ('.count($fields['list']).')';
$html .= '</a>';
}
}
$html .= '</a>';
вставить php, ничего не вышло. foreach ($dbCategories->db as $key=>$fields) {
$class = 'menu-item';
if (DOMAIN_CATEGORIES.$key === $_SERVER['REQUEST_URI'] ) {
$class = 'menu-item_active';
}
$count = count($fields['list']);
if (!$this->getValue('hideCero') || $count>0) {
$html .= '<a class="';
$html .= $class . " href="'.DOMAIN_CATEGORIES.$key.'">';
$html .= $fields['name'];
$html .= ' ('.count($fields['list']).')';
$html .= '</a>';
}
}