HomeHome Product Discus... Product Discus...RazorCartRazorCartProduct List - Default View List ViewProduct List - Default View List View
Previous
 
Next
New Post
8/20/2017 8:55 PM
 
Hi there,

I want to make it so the default view on the product list page to be "list view".

How do I do that as I can't see anything in the settings?

Thanks
 
New Post
8/22/2017 5:07 PM
 
Hi guys,

Any word on this?
 
New Post
8/22/2017 5:44 PM
 
Hi Yener,

To make the default view "ListView" you will need to use custom viewsets for the product list module, please login to the admin console, under the templates menu click viewsets, click the actions button next to the "Product List" module and click Copy Viewset, this will create a copy of the MVC view folder in the DNN portals folder, now restart the application for the MVC view locations change.
Select the file "_FilterPanel.cshtml" and click edit from the actions menu, as you see from the code the two buttons does set the scope variable "displayMode" either "gridview" or "listview", any where in this document you can use the ngInit to initialize the value to listview. for example you can add this to the parent div of the buttons like this:
<div class="btn-group" ng-init="list.displayMode = 'listview'">

Regards,
Wael
 
New Post
8/22/2017 7:49 PM
 
Brilliant!

Thanks Wael, that worked
 
Previous
 
Next
HomeHome Product Discus... Product Discus...RazorCartRazorCartProduct List - Default View List ViewProduct List - Default View List View