Oct 22, 2014 at 4:10 PM
Edited Oct 22, 2014 at 4:50 PM
My code never returns true meaning the result.View is coming back as null. The view I am looking for is located in a theme in Views/Orchard.Speedbump/Speedbump. I was using "Test Tenant Site Valid URL" as the name for my view "Test Tenant
Site Valid URL.cshtml" I was not including any kind of path though. Could this be the problem?
Edit: Also when trying to use either of these methods "masterView" is expected as a parameter. What is "masterView" referring to?
Edit: I tried the following but it always returns true even when the view doesn't actually exist
private bool ViewExists(string name)
ViewEngineResult result = _viewEngine.FindPartialView(ControllerContext, "~Themes/TheThemeMachine/Views/Orchard.Speedbump/SpeedBump/" + name, useCache: false);
return (result != null);
where name is the name of the view I am looking for such as "Test InvalidURL" for the view "Test InvalidURL.cshtml"
Edit: If I use "return (result.View != null);" then it always returns false even when the view exists