Skip to content

Instantly share code, notes, and snippets.

@ArveSystad
Last active August 29, 2015 14:03
Show Gist options
  • Select an option

  • Save ArveSystad/f8e3a948f72d0d6d1f52 to your computer and use it in GitHub Desktop.

Select an option

Save ArveSystad/f8e3a948f72d0d6d1f52 to your computer and use it in GitHub Desktop.
public class ViewTemplateCoordinator : IViewTemplateModelRegistrator
{
public void Register(TemplateModelCollection viewTemplateModelRegistrator)
{
viewTemplateModelRegistrator.Add(
typeof(ProductVariant),
new TemplateModel
{
Name = "InlineArticleProducts",
AvailableWithoutTag = false,
Tags = new[] { "InlineContent" },
TemplateType = typeof(InlineArticleProductController),
Path = "~/Views/Path/To/InlineArticleProduct.cshtml",
TemplateTypeCategory = TemplateTypeCategories.MvcPartialController
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment