Zones and Widgets and Content Types, oh my.

Topics: Writing themes
Nov 22, 2011 at 10:54 AM

Hi guys,

I have two zones in my Layout.cshtml, SidebarTop and ContentBottom, both of those are going to contain a Widget of the same type, AnythingSliderWidget.

Now what I'm trying to do is when I have a content type of Page, I want to surround those widgets with two different wrappers.

Now what I've done is created an Alternate for each, either Zone-SidebarTop.html and wrapped it and done Display(Model.Content) or Widget-SidebarTop, my issue is, this will be applied to all content types? Is there a way to say only for a particular content type apply these alternates?

Or am I tackling this wrong?

Nov 22, 2011 at 11:01 AM

So I just thought create multiple zones in my layout and only let them appear on the correct layer, problem fixed?

Developer
Nov 22, 2011 at 12:02 PM

Defining the appearance of widgets is most straightforward with layers, yes, if you can specify the page by url.