News:

Support the VirtueMart project and become a member

Main Menu

how to load different product templates in sublayouts

Started by 2dmaster, June 17, 2020, 13:59:15 PM

Previous topic - Next topic

2dmaster

Hi,
in /mytpl/com_virtuemart/sublayouts/products.php

i try load products_ones.php  here and products_twos.php

<?php echo $this->loadTemplate('ones'); ?>
<?php echo $this->loadTemplate('twos'); ?>

<?php echo $this->loadTemplate('product_ones'); ?>
<?php echo $this->loadTemplate('product_twos'); ?>

<?php echo $product->loadTemplate('ones'); ?>
<?php echo $product->loadTemplate('twos'); ?>

<?php echo $product->loadTemplate('product_ones'); ?>
<?php echo $product->loadTemplate('product_twos'); ?>

not work i thinks, try with error (((

how to load different templates ? 3/1 4/2 style each second product is have some different tpl because.... pls help now!!!




pinochico

www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

PRO

FROM WHERE, are you trying to load the template?


   echo shopFunctionsF::renderVmSubLayout($this->productsLayout,array('products'=>$this->products,'currency'=>$this->currency,'products_per_row'=>$this->perRow,'showRating'=>$this->showRating));


What styling are you trying to do? sounds like you need to do it with css.  You mean style every 2nd product etc?