Created
April 17, 2012 21:27
-
-
Save esitefinity/2409172 to your computer and use it in GitHub Desktop.
Extending OpenAccessCatalogDataProvider
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Telerik.Sitefinity.GenericContent.Model; | |
using Telerik.Sitefinity.Modules.Ecommerce.Catalog.Data; | |
namespace SitefinityWebApp | |
{ | |
public class CustomProductRouteHandler : OpenAccessCatalogDataProvider | |
{ | |
public override string GetUrlFormat(ILocatable item) | |
{ | |
return "/[DetailRouteKey]/[UrlName]"; | |
} | |
protected override string GetUrlPart<T>(string key, string format, T item) | |
{ | |
if (key == "DetailRouteKey") | |
{ | |
return "Detail"; | |
} | |
return base.GetUrlPart<T>(key, format, item); | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment