0
votes

I have an MVC 5 application set up and it deploys to a Sitecore 8.0 Website. I have the Sitecore home item set up to render two "controls" - a PartialView Rendering called PageHeader and a Controller called HelloWorldController.

I am invoking these on a Layout which is assigned to the home item - the code that registers to that layout is as follows:

        <p>Today's date is :@DateTime.Today.ToShortDateString()</p>

@Html.Sitecore().Placeholder("content")

For some reason, when I visit the homepage, I get this error:

The partial view '/views/renderers/Views/PageHeader.cshtml' was not found or no view engine supports the searched locations. The following locations were searched: /views/renderers/Views/PageHeader.cshtml

However, my PageHeader doesn't live inside "/views/renderers/" . that directory doesn't exist. Does Sitecore generate this "/views/renderers/" from somewhere?

1

1 Answers

2
votes

These is due to Mvc.RenderersViewFolder setting in App_Config\Include\Sitecore.Mvc.config, you need to patch the value:

<!--  MVC: Path to the base file folder that contains the views used for item renderings.
    Default: "/views/renderers"
-->
<setting name="Mvc.RenderersViewFolder" value="/views/renderers" />

Patch the value to either empty string or whatever your views folder is.