Override rendering of Tag (or other) View

Topics: Customizing Orchard, Writing themes
May 17, 2011 at 2:11 PM

Hello everyone,

I'm trying to override the appearence of the Tag Page (/Tags/MyTag) without success. I want to override completely how this page render contents.

I've found in the Orchard.Tags module the view responsible of rendering the contents: Search.cshtml

Actually I can modify that view but I don't want, instead I'd like to customize it in my theme. 

How can I do it?

May 17, 2011 at 3:05 PM

Just copy the file into your theme that you want to override, and customize it there.

May 17, 2011 at 3:10 PM

I've tried but it doesn't work.

The file is located in "/Modules/Orchard.Tags/Views/Home/Search.cshtml". I've just copied it to my "Views" folder and it doesn't work. I've tried creating the "Home" folder in my "Views" folder and nothing happens (and about this I wonder if some other areas has the Search action in the home controller what happens....).

Did you successfully customize it?

Coordinator
May 17, 2011 at 5:12 PM

Can you try Views\Orchard.Tags\Home\Search.cshtml?

May 18, 2011 at 7:20 AM

I've tried:

\Views\Orchard.Tags\Home\Search.cshtml

\Views\Orchard.Tags\Views\Home\Search.cshtml

I've tried countless combinations but with no luck.

Customizing pages should be very basic stuff, but I can't do it. Someone has done it?

Coordinator
May 18, 2011 at 8:19 PM

Ah, actually forget it, it should just be directly under Views. I verified that it works. That is a problem though because that name is not qualified enough. I created http://orchard.codeplex.com/workitem/17847 to keep track of this.