Applying themes to search

Topics: Writing themes
Feb 25, 2011 at 4:28 PM

When I try to override ThemeName\Views\Search\Index.cshtml with my theme's implementation, it does not work.  I can override ThemeName\Views\Parts\Search.SearchForm.cshtml, just not the Index.cshtml.  Also, attempts to control the placement in the search results using were fruitless.  Thanks for any help.

Feb 25, 2011 at 4:33 PM

For the Views, you need to add the Area named, i.e. the module name, i.e. ThemeName\Views\Orchard.XXXX\Views\Index.cshtml.

Feb 25, 2011 at 4:56 PM

Tried the following:

  • ThemeNamed\Views\Orchard.Search\index.cshtml
  • ThemeNamed\Views\Orchard.Search\Views\index.cshtml
  • ThemeNamed\Views\Orchard.Search\Views\Search\index.cshtml

I recycled the app pool each time between attempts.  Could this be because the index.cshtml is definedi n the controller and not the driver in that module?

Feb 25, 2011 at 5:52 PM

After some verifications it's ThemeName\Views\ModuleName\ControllerName\ViewName.cshtml

Feb 25, 2011 at 7:00 PM

It worked as you said: