VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: extonjaez on November 04, 2022, 17:34:21 PM

Title: How create a new "Sublayouts for products in category" display ?
Post by: extonjaez on November 04, 2022, 17:34:21 PM
Hello,

Please how create a new "Sublayouts for products in category" display, by exemple a new version (who is a midification) of "product-horizon" ? (see screen capture)
Many thanks for your help
Arnaud

System Information
com_virtuemart.4.0.7.10731_package
PHP Built On   Linux s22095112 3.10.0-1127.13.1.el7.x86_64 #1 SMP Tue Jun 23 15:46:38 UTC 2020 x86_64
Database Type   mysql
Database Version   10.2.44-MariaDB
Database Collation   utf8mb4_general_ci
Database Connection Collation   utf8mb4_general_ci
Database Connection Encryption   None
Database Server Supports Connection Encryption   No
PHP Version   8.1.9
Web Server   Apache
WebServer to PHP Interface   fpm-fcgi
Joomla! Version   Joomla! 4.2.4 Stable [ Uaminifu ] 25-October-2022 15:20 GMT
User Agent   Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36
Title: Re: How create a new "Sublayouts for products in category" display ?
Post by: GJC Web Design on November 04, 2022, 17:52:18 PM
create a new file in your template over rides

templates\YOUR_TEMPLATE\html\com_virtuemart\sublayouts\products_different.php
Title: Re: How create a new "Sublayouts for products in category" display ?
Post by: extonjaez on November 11, 2022, 12:33:08 PM
Hello

Sorry i wasn't clear in my question
In fact i would like use the actual « products_horizon » -Sublayouts for products in category- and modify it (with by exemple the name « products_horizon2 » but leaving « products_horizon » unmodified (as it is now).
Regards
Arnaud
Title: Re: How create a new "Sublayouts for products in category" display ?
Post by: jenkinhill on November 11, 2022, 15:40:23 PM
That's what GJC described. You leave the original sub-layout file untouched and use an edited copy for the override.

Or are you saying you want to be able to use both layouts?  You can define a different sub-layout for each category (if you wish) on each category view settings tab.