I want override ViewComponent threw plugin.
Any idea about that?
Any help will be appreciated.
Thank you
- Raju
public class TestViewEngine : IViewLocationExpander
{
public void PopulateValues(ViewLocationExpanderContext context)
{
//nothing to do here.
}
public IEnumerable<string> ExpandViewLocations(ViewLocationExpanderContext context, IEnumerable<string> viewLocations)
{
if (context.AreaName == null && context.ViewName == "Components/OrderTotals/Default")
{
viewLocations = new string[] { $"/Plugins/Demo/Views/{{0}}.cshtml"
}.Concat(viewLocations);
}
return viewLocations;
}