VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: roman5527 on March 31, 2015, 02:07:43 AM

Title: VM 3 template
Post by: roman5527 on March 31, 2015, 02:07:43 AM
Hello,
How can I have different views on the products homepage and category? thank you
Title: Re: VM 3 template
Post by: liquid.ideas on March 31, 2015, 08:12:38 AM
Did you read this post? http://forum.virtuemart.net/index.php?topic=90935.0
Title: Re: VM 3 template
Post by: roman5527 on March 31, 2015, 18:23:40 PM
Yes.
I have problem with sublayouts .

I have copy default.php from component/com_virtuemart/view/virtuemart/tmp/default.php

to templates/mytemplate/html/com_virtuemart/virtuemart/ and rename it to frontpage.php

Next I select in configuration VM option : Layout title page to my frontpage.php

In frontpage.php I change code : echo $this->renderVmSubLayout($this->productsLayout,array('products'=>$this->products,'currency'=>$this->currency,'products_per_row'=>$products_per_row,'showRating'=>$this->showRating)); //$this->loadTemplate('products');

to

echo $this->renderVmSubLayout($this->productsLayout,array('products_frontpage'=>$this->products,'currency'=>$this->currency,'products_per_row'=>$products_per_row,'showRating'=>$this->showRating)); //$this->loadTemplate('products');

I have created file product_frontpage.php in templates/mytemplate/html/com_virtuemart/sublayouts/ .

But now I dont see featured-view , latest-view, ...
What am I doing wrong?
thnaks