hi all,
I have a site with the following categories:
*PRODUCTS
*--- PRODUCTS_CAT_1
*--- PRODUCTS_CAT_2
*
subProd_Cat_1
*
subProd_Cat_2
*--- PRODUCTS_CAT_3
*NEWS
*COMPANY
for the PRODUCTS category I use a k2 template folder called 'products', and the same goes for 'NEWS' and 'COMPANY'
all the PRODUCTS's children categories inherit its template.
everything is working fine, but I have something that is driving me crazy and don't know how to achieve:
I have the main menu with these options: HOME | PRODUCTS | NEWS | COMPANY
the products, news and company menu items are of k2 category type and each one points to its category.
for the HOME (default) menu item I am showing various modules and it's working ok, but I also need to show a div with all the PRODUCTS subCategories (only 1 level down)... it's got to have just the name (with link) and the image for each category. Just like a frontpage for a product catalog, and it has to be a different layout (much simple) than when I select the PRODUCTS item menu.
I tried creating a fake k2 category, on top of PRODUCTS and giving this category a different template, and then changing the 'category.php' file.
I iterate through every child category using this code:
____ $childs = K2ModelItemlist::getCategoryFirstChilds($this->subCategories[0]->id, ""); (with this sentence I'm getting all the PRODUCT child categories)
and then a 'for' sentence iterating through each subcategory. I can create a div for every cat here with the name and the image, but the link is blank...
I am sure there is a better and maybe easier way to achieve this.
could anyone please help me out here?
thanks!
I have a site with the following categories:
*PRODUCTS
*--- PRODUCTS_CAT_1
*--- PRODUCTS_CAT_2
*
subProd_Cat_1
*
subProd_Cat_2
*--- PRODUCTS_CAT_3
*NEWS
*COMPANY
for the PRODUCTS category I use a k2 template folder called 'products', and the same goes for 'NEWS' and 'COMPANY'
all the PRODUCTS's children categories inherit its template.
everything is working fine, but I have something that is driving me crazy and don't know how to achieve:
I have the main menu with these options: HOME | PRODUCTS | NEWS | COMPANY
the products, news and company menu items are of k2 category type and each one points to its category.
for the HOME (default) menu item I am showing various modules and it's working ok, but I also need to show a div with all the PRODUCTS subCategories (only 1 level down)... it's got to have just the name (with link) and the image for each category. Just like a frontpage for a product catalog, and it has to be a different layout (much simple) than when I select the PRODUCTS item menu.
I tried creating a fake k2 category, on top of PRODUCTS and giving this category a different template, and then changing the 'category.php' file.
I iterate through every child category using this code:
____ $childs = K2ModelItemlist::getCategoryFirstChilds($this->subCategories[0]->id, ""); (with this sentence I'm getting all the PRODUCT child categories)
and then a 'for' sentence iterating through each subcategory. I can create a div for every cat here with the name and the image, but the link is blank...
I am sure there is a better and maybe easier way to achieve this.
could anyone please help me out here?
thanks!