VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: manolodantonio on October 06, 2016, 13:26:07 PM

Title: Hide browse-view if empy
Post by: manolodantonio on October 06, 2016, 13:26:07 PM
Hi!  :D

i just migrated from J!2.5 to J!3.6.2/VM3.0.18 and almost everything is working fine (yay!)
I have little experience with VM, and i could use some tips

i got this behaviour of VM categories view:
(http://i65.tinypic.com/2qsc51f.jpg)

This is a page that shows subcategories. As you can see div.browse-view is below the subcategories list (div.category-view), but it's empty cause this category has no products. Is there a way to hide it only when empty?
Or, even better: in this case (no products, only subcats) is there a way to switch the display order of div.browse-view with div.category-view, so that div.browse-view act as a title for this page?

Thanks
Title: Re: Hide browse-view if empy
Post by: GJC Web Design on October 06, 2016, 15:07:08 PM
it will depend on your template

most templates will have something like only show if products

e.g.

if (!empty($this->products) && $this->showproducts) {

Title: Re: Hide browse-view if empy
Post by: manolodantonio on October 07, 2016, 10:17:22 AM
Ahh i was hoping to find some hidden configuration i had missed. Anyway, i will give it a try.
Thanks!