This project is read-only.

Applying themes to search

Topics: Writing themes
Feb 25, 2011 at 5: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 5: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 5: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 6:52 PM

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

Feb 25, 2011 at 8:00 PM

It worked as you said: