Hi.
The scenario is that i want to present a list of all manufacturers in a dropdown, and then filter on them from the homepage.
Is there a way to get a list of all manufacturers on the frontpage? How can i do that?
Best regards,
Dan
Developer forum
E-mail notifications
Filter manufacturers on homepage
Dan Lundgren
Posted on 23/09/2014 14:04:36
Replies
Nicolai Høeg Pedersen
Posted on 23/09/2014 14:17:23
Hi Dan
In a Razor template you can do like this:
foreach (Dynamicweb.eCommerce.Products.Manufacturer m in Dynamicweb.eCommerce.Products.Manufacturer.getManufacturers()) { string link = "Default.aspx?ID=1&manfacturer=" + m.ID; }
BR Nicolai
Dan Lundgren
Posted on 23/09/2014 16:11:42
First of all, thank you very much for the quick reply.
We've used the DW Solutionset as a base for our solution, so we havent used Razor that much.
Can i get access to the same loop in the html? Or is there another way to do this?
Nicolai Høeg Pedersen
Posted on 23/09/2014 16:29:59
Hi Dan
The loop is not available in html templates.
So you either have to create a template extender or use a Razor template...
BR Nicolai
You must be logged in to post in the forum