Close

Fixed ViewMode

ccmok2
6 years ago
#14266 Quote
Avatar
  • 3
I would like to fix the view mode of one category, but keep other category normally. It causes the ajaxFilter not work. Please help.

I have tried the following conditions, but all does not work:
(1) Change "CatalogPagingFilteringModel.ViewMode = list" at CatalogController; (FAILED);
(2) Without "viewmode-selector", redirect to current url with viewmode=list by javascript (FAILED);
SDobrev
6 years ago
#14269 Quote
Avatar
  • Moderator
  • 283
Hi,

Opening the category with viewMode=list or grid in the URL is setting the view mode.
http://demos.nop-templates.com/computers#/viewMode=list
Your approach to redirect to the page with viewMode parameter should work. The other variant is to change the view mode with JS/jQuery on page load.
Best Regards,
Stoyan Dobrev
Nop-Templates.com