Widget alternative for content item widgets content item type

Topics: Writing themes
Apr 18, 2014 at 12:39 PM
Hi I was wondering if there is a way to provide a template for such a scenario, if not, illget my hands dirty and code one up.

I have a widget that holds a content item, and I wanted to provide a template depending on the type of the content item that holds.

e.g. I have a widget containing a content item that points to a content type of A and another content item widget that hold a type of b, I would like templates named :

Widget-ContentItemwidget-type-A.cshtml
Widget-ContentItemwidget-type-B.cshtml

all i can seem to get is one for the zone or a url specifically

is this possible already or do i have to role my sleeves up?

thx
Andy.
Apr 18, 2014 at 5:15 PM
I haven't used this and don't know exactly what it's capable of, but might be worth taking a look at before you start coding:

http://gallery.orchardproject.net/List/Modules/Orchard.Module.Contrib.Widgets