Skip to main content

Re: Select category layout

More
14 years 6 months ago #41761 by jansuhr
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.

More
14 years 6 months ago #41885 by nicolas
Replied by nicolas on topic Re: Select category layout
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.

More
14 years 6 months ago #41921 by jansuhr
Replied by jansuhr on topic Re: Select category layout
Yeah I got that but how do I select them?

Jan

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

More
14 years 6 months ago #42036 by nicolas
Replied by nicolas on topic Re: Select category layout
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.

More
8 years 8 months ago #285393 by ianspeed
Replied by ianspeed on topic Re: Select category layout
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.

More
8 years 8 months ago #285397 by nicolas
Replied by nicolas on topic Re: Select category layout
Hi,

It's still the same for now.

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

More
6 years 3 months ago #320159 by justme
Replied by justme on topic Re: Select category layout
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.

More
6 years 3 months ago #320172 by nicolas
Replied by nicolas on topic Re: Select category layout
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.

More
6 years 3 months ago #320635 by justme
Replied by justme on topic Re: Select category layout
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.179 seconds
Powered by Kunena Forum