Skip to content

Instantly share code, notes, and snippets.

@esitefinity
Created April 17, 2012 21:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save esitefinity/2409172 to your computer and use it in GitHub Desktop.
Save esitefinity/2409172 to your computer and use it in GitHub Desktop.
Extending OpenAccessCatalogDataProvider
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