This project is read-only.

2 Recent blog post widgets on one page need different templates

Topics: Customizing Orchard
Aug 28, 2011 at 6:59 AM

I have two recent blog post widgets on the homepage. One is in the Content Zone. It lists the latest post (1). It should show 500 words of the post. The second is in Zone TripelFirst. It lists 4 recent posts. It should show 50 words (ish) of the post. The Widget in the TripelFirst will appear on every page including the homepage. I could create a template for the TripelFirst zone with "Parts.Common.Body.Summary-BlogPost.cshtml", but this will affect all other zones that contain a list of blog posts.


Any ideas how I could specify a Zone with my URL Alternate?


Thanks in advance,



Aug 29, 2011 at 2:28 PM

This thread might help. It talks about how to create alternates for specific zones:

Sep 3, 2011 at 8:06 AM

I don't get it. I have added the WidgetAlternatesFactory to the Orchard.DesignerTools. This allows me to create alternates for Widget-TripelFirst.cshtml, but doesn't allow me to create a template for a specific part (e.g. Widget-TripelFirst-List-Content-Parts.Common.Body.Summary). Widget-TripelFirst.cshtml.cshtml just has @Display(Model.Content). I'm not sure how I make the jump. Thanks for your help.


Sep 5, 2011 at 10:43 PM

Does anyone know how I can put a select case for different zones in the part template "Parts.Common.Body.Summary-BlogPost-url-homepage.cshtml"? Or better yet is there a way to add an alternate factory that would allow filtered displays by both zone and part?



Sep 8, 2011 at 11:57 PM

One direction to explore: (you have alternates for the widget so this would enable you to alternate in place for the parts)