Re: Select category layout

  • Posts: 182
  • Thank you received: 15
12 years 3 weeks ago #41761

I would like to set a different layout file for the category listing. For product view we can select the file for this but I can't find any setting for the same thing for a category.

We have a lot of settings for the details and how it should be presented but I would like to be able to select a file as well that I then can control with CSS.

Thanks

Jan

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

  • Posts: 81361
  • Thank you received: 13035
  • MODERATOR
12 years 3 weeks ago #41885

You mean that you wanted a different category listing for different categories ? There is indeed no option for that.
You would have to edit the view files of the category view via the menu Display->Views for that.

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

  • Posts: 182
  • Thank you received: 15
12 years 3 weeks ago #41921

Yeah I got that but how do I select them?

Jan

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

  • Posts: 81361
  • Thank you received: 13035
  • MODERATOR
12 years 3 weeks ago #42036

The layout (div, table, list) is displayed by the line:
$html = $this->loadTemplate($layout_type);

in the listing view file.
So you could do like that:

if($_GET==XXX) $html = $this->loadTemplate('custom');
else $html = $this->loadTemplate($layout_type);

supposing that the id of your category is XXX and that the name of your custom listing view file is called listing_custom

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

  • Posts: 164
  • Thank you received: 7
  • Hikashop Essential
6 years 2 months ago #285393

Hi Nicolas,
Happy New Year!
Is this still the case with trying to set a custom category view? Because it would be good if we could select the category from the menu>display options if possible (as with the product etc).

Many thanks,

Ian

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

  • Posts: 81361
  • Thank you received: 13035
  • MODERATOR
6 years 2 months ago #285397

Hi,

It's still the same for now.

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

  • Posts: 64
  • Thank you received: 7
  • Hikashop Business
3 years 9 months ago #320159

I read that you can select a different file for a product layout, but I can't find where to do this? I can create a different layout for listing_img_title, but on the product page when I look at the page layout option, my new layout is not in the list, the one I use isn't in the list either. I can select inherit and a vew other options, but can't select the layout. So where does it inherit the layout from? It isn't in the category either. So kind of confused as to why there is an option to create a layout, but can't select it anywhere. Can someone help? Thanks.

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

  • Posts: 81361
  • Thank you received: 13035
  • MODERATOR
3 years 9 months ago #320172

Hi,

The listing_img_title layout is the layout of the product display on the listings.
You can select / change it in the "Layout type" setting under the "products options" tab of your products/categories listing menu items or under the "HikaShop options" tab of your HikaShop content modules when you edit them via the Joomla menus/modules manager.
For the product details page, you have a generic "Layout on product page" setting under the Display tab of the HikaShop configuration and in each product settings page. For that setting, it's the show_default.php view file that you want to customize via the menu Display>Views.

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

  • Posts: 64
  • Thank you received: 7
  • Hikashop Business
3 years 9 months ago #320635

Sorry for the late reply. Thanks, this helps!

The following user(s) said Thank You: Philip

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

Time to create page: 0.092 seconds
Powered by Kunena Forum