0
votes

I have Orchard 1.7 setup with blog recipe.

The home screen display a list of blog posts.

I want to override the way the content is displayed in summary view. I could do this for each parts. But my styling is such that I need to wrap title, body, and meta tags with a special div when ever the display type is summary.

The problem is:

After shape tracing I understood that the template used in the home page (summary) is same as the detailed one. Content.cshtml

For detail view I want to use the default core-> Views/Content.cshtml but for summary I need to supply my own. How can I do this?

OR

How to write a driver/widget to the home page. I know how I can do this for parts/fields/modules but I don't have an idea on how to create a driver for Blog home page.

Whenever I add a widget to the homepage the default blog post list still get displayed.

1

1 Answers

1
votes

Just create a file called Content.Summary.cshtml in your theme. This will target all summary views, so if you have more than just blog posts on your site you will probably want to have Content-BlogPost.Summary.cshtml.

I wrote a small blog post on Item templates in Orchard if you are interested... http://arkleseizure.net/what-the-hell-is-an-item-template