I am looking for some examples or routing patterns for the following kind of scenario:
General example of action execution: {controller} / {action} / {id}
So, in the product search script for the store, you will have:
public class ProductsController: Controller
{
public ActionResult Search(string id)
{ ... }
}
Say you had several stores to do this, and you wanted it to be consistent, is there any way: {category} / {controller} / {action} / {id}
So that you can find a specific search for a specific store, but use a different search method for a different store?
(If you want the store name to be a higher priority than the function itself in the URL)
Or it will go down to:
public class ProductsController: Controller
{
public ActionResult Search(int category, string id)
{
if(category == 1) return Category1Search();
if(category == 2) return Category2Search();
...
}
}
, , , , URL- , , /?
:
, , - , URL-, , .
IE:
/this/search/items/search + term < - works
/that/search/items/search + term < - , .