Jump to content

Ariseweb

Members
  • Posts

    2
  • Joined

  • Last visited

Profile Information

  • First Name
    Javier
  • Last Name
    Rilo Seoane

Ariseweb's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi my theme uses tmmegamenu. I want to show the subcategory images but i cant find the solution. I know that i have to modify this function: protected function generateCategoriesMenu($categories) { $html = ''; foreach ($categories as $category) { if ($category['level_depth'] > 1) { $cat = new Category($category['id_category']); $link = Tools::HtmlEntitiesUTF8($cat->getLink()); } else { $link = $this->context->link->getPageLink('index'); } $html .= '<li'.(($this->page_name == 'category' && (int)Tools::getValue('id_category') == (int)$category['id_category']) ? ' class="sfHoverForce category"' : ' class="category"').'>'; $html .= '<img class="foto_categorias" src="'; $html .= $foto; $html .= '">'; $html .= '<a href="'.$link.'" title="'.$category['name'].'">'.$category['name'].'</a>'; if (isset($category['children']) && !empty($category['children'])) { $html .= '<ul>'; $html .= $this->generateCategoriesMenu($category['children'], 1); $html .= '</ul>'; } $html .= '</li>'; } return $html; } I created the variable $fotos to create the src of the image, but i cant find the function or class to do it. Can you help me please ??
  2. Hi my theme uses tmmegamenu. I want to show the subcategory images but i cant find the solution. I know that i have to modify this function: protected function generateCategoriesMenu($categories) { $html = ''; foreach ($categories as $category) { if ($category['level_depth'] > 1) { $cat = new Category($category['id_category']); $link = Tools::HtmlEntitiesUTF8($cat->getLink()); } else { $link = $this->context->link->getPageLink('index'); } $html .= '<li'.(($this->page_name == 'category' && (int)Tools::getValue('id_category') == (int)$category['id_category']) ? ' class="sfHoverForce category"' : ' class="category"').'>'; $html .= '<img class="foto_categorias" src="'; $html .= $foto; $html .= '">'; $html .= '<a href="'.$link.'" title="'.$category['name'].'">'.$category['name'].'</a>'; if (isset($category['children']) && !empty($category['children'])) { $html .= '<ul>'; $html .= $this->generateCategoriesMenu($category['children'], 1); $html .= '</ul>'; } $html .= '</li>'; } return $html; } I created the variable $fotos to create the src of the image, but i cant find the function or class to do it. Can you help me please ??
×
×
  • Create New...