How to set Template Style for product page?

  • Posts: 223
  • Thank you received: 26
  • Hikaserial Subscription Hikashop Business
10 months 6 days ago #351910

-- HikaShop version -- : 4.7.0
-- Joomla version -- : 3.10.11
-- PHP version -- : 7.4

Hi guys,
Until now, on Joomla 3, I was using Advanced Template Manager from Regularlab to specify what template to use on sections of the website.
Now, in Joomla 4 I'm not able to do that anymore, Regularlab will not update ATM to joomla 4.
In joomla 3 I had one template style for product listing view (category), and a completely different one fore product page.

Any suggestion?

Please Log in or Create an account to join the conversation.

  • Posts: 81379
  • Thank you received: 13037
  • MODERATOR
10 months 5 days ago #351912

Hi,

I don't know of any alternative extension.
However, it should be easy to do the same thing with a small view override as per joomla.stackexchange.com/questions/21171...te-style-to-subpages
In your case, configure the listing template as the main template. Then, try adding such code at the beginning of the product / show view file for your main template via the menu Display>Views :

<?php
$app = JFactory::getApplication();
$params = array();
$app->setTemplate('xxx', $params);
 ?>
where xxx is to be replaced by the folder name of the template you want to use on your product details pages.
It should then switch to that template when accessing a product page.

The following user(s) said Thank You: oxido

Please Log in or Create an account to join the conversation.

Time to create page: 0.054 seconds
Powered by Kunena Forum