I want to show a product list as a list and as a grid.
I have made a template for each, but I would like a customer to be able to switch between them when they are in the catalog.
What would be the best way of doing this?
I want to show a product list as a list and as a grid.
I have made a template for each, but I would like a customer to be able to switch between them when they are in the catalog.
What would be the best way of doing this?
Hi Jim,
You can make use of the View query string parameter. When the parameter is present, DW will try to load a template called OriginalTemplate_ViewValue.html.
So, when you have assigned ProductList.html and browse to the page with View=List in the query string, Dynamicweb will use the template ProductList_List.html.
You can see an example of this in the solution set:
http://solutionset.dynamicweb.dk/en-US/ProductList/Bikes.aspx?View=Tiles
http://solutionset.dynamicweb.dk/en-US/ProductList/Bikes.aspx?View=Expanded
Hope this helps,
Imar
You must be logged in to post in the forum