Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save casper-rasmussen/87adc1d7b02f484a0513b7a468497355 to your computer and use it in GitHub Desktop.
Save casper-rasmussen/87adc1d7b02f484a0513b7a468497355 to your computer and use it in GitHub Desktop.
public class SectionHierachicalCatalogRouter : HierarchicalCatalogPartialRouter
{
public const string SectionRouteValue = "section";
//Predefined segments that will not be resolved to content
private IEnumerable<string> _segments = new string[] { "specifications", "specifications/", "interior", "interior/", "quote", "quote/", "technology", "technology/", "accessories", "accessories/", "design", "design/" };
private readonly IContentLoader _contentLoader;
public TabHierachicalCatalogRouter(CatalogContentBase commerceRoot, Func<ContentReference> func)
: base(func, commerceRoot, false)
{
this._contentLoader = ServiceLocator.Current.GetInstance<IContentLoader>();
}
protected override CatalogContentBase FindNextContentInSegmentPair(CatalogContentBase catalogContent, SegmentPair segmentPair, SegmentContext segmentContext, CultureInfo cultureInfo)
{
//Coming up..
}
public override PartialRouteData GetPartialVirtualPath(CatalogContentBase content, string language, RouteValueDictionary routeValues,
RequestContext requestContext)
{
//Coming up
}
public override object RoutePartial(PageData content, SegmentContext segmentContext)
{
//Coming up
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment