Developer forum

Forum » Ecommerce - Standard features » Filter manufacturers on homepage

Filter manufacturers on homepage

Dan Lundgren
Reply

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


Replies

 
Nicolai Høeg Pedersen
Reply

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
Reply

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
Reply

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