Select category layout

  • Posts: 182
  • Thank you received: 15
6 years 6 months 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: 63319
  • Thank you received: 9127
  • MODERATOR
6 years 6 months 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
6 years 6 months 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: 63319
  • Thank you received: 9127
  • MODERATOR
6 years 6 months 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: 84
  • Thank you received: 1
  • Hikashop Essential
8 months 2 weeks 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: 63319
  • Thank you received: 9127
  • MODERATOR
8 months 2 weeks ago #285397

Hi,

It's still the same for now.

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

Time to create page: 0.087 seconds
Powered by Kunena Forum