Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > CMSWebPartZone attributes? View modes: 
User avatar
Member
Member
wensveen-evident - 2/3/2011 4:37:02 AM
   
CMSWebPartZone attributes?
Hi,

I have a <cc1:CMSWebPartZone ID="wpzWidgetsRight" runat="server" /> web part zone in the layout of a page template, and I wish to use this zone so that content editors can add widgets. To do this I can set the 'Widget zone type' to 'Customization by page editor' in the design view of the page.

I think I can set this declaratively by setting the ViewMode attribute to something. Using reflector I saw this is a value from ViewModeEnum, but I can't figure out which value corresponds to 'Customization by page editor'.

Are the properties for CMSWebPartZone documented somewhere?

Thanks,
Matthijs Wensveen

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 2/3/2011 7:22:21 AM
   
RE:CMSWebPartZone attributes?
Hi,

If I am getting the right meaning, you want to allow the editors to add web parts on the Page tab? If so, this is not possible and for this reason are intended widgets to be used.

Best regards,
Juraj Ondrus

User avatar
Member
Member
wensveen-evident - 2/3/2011 8:30:16 AM
   
RE:CMSWebPartZone attributes?
No, I actually want editors to be able to add widgets to the page. Don't I need to add a CMSWebPartZone to the page for this? If not, how do I go about this?

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 2/7/2011 2:23:33 AM
   
RE:CMSWebPartZone attributes?
Hi,

I am not sure what do you mean exactly. You want to make the editor users (who do not have access to the Design tab) to select/decide whether the zone will be web part or widget zone?

Could you please check out the widgets documentation to get better idea how it works?

Best regards,
Juraj Ondrus

User avatar
Member
Member
wensveen-evident - 2/7/2011 4:01:10 AM
   
RE:CMSWebPartZone attributes?
Hi,

I read the documentation, but unfortunately that didn't answer the question.
I'll try to clarify.

I want to create a widget zone, plain and simple, so that page editors can add widgets to the page. Usually I go about this by adding a CMSWebPartZone control to the page's layout and then configure it in the Design tab of the page and set 'Widget zone type' to 'Customization by page editor'. This works fine and this is ultimately what I want.

My question is whether or not I can set a property on the CMSWebPartZone control so that I don't have to configure the webpart zone / widget zone on the page's design tab, but can declaratively say that this is to be a widget zone. For instance,

<cms:CMSWebPartZone runat="server" ID="wpzWidgets" ViewMode="Edit" />

And, if this is correct, what the possible values for ViewMode mean: (CMS.PortalEngine.ViewModeEnum: Design, DesignDisabled, Edit, EditDisabled, EditForm, EditNotCurrent, GroupWidgets, LiveSite, Preview, Product, Properties, Unknown, UserWidgets, UserWidgetsDisabled)

Best regards,
Matthijs

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 2/8/2011 9:49:12 AM
   
RE:CMSWebPartZone attributes?
Hi,

I got it know. Regrettably, there is no such a property which will say if it is web part or widget zone. You need to always set it in the zone properties on the Design tab.

The view mode values are internal set by the system, they have no affect on the web part or widget zone.

Best regards,
Juraj Ondrus

User avatar
Member
Member
wensveen-evident - 2/8/2011 10:12:01 AM
   
RE:CMSWebPartZone attributes?
Thank you for your answer.

While experimenting with ViewMode, I saw that the zone type change for some values. But I understand that this is a side-effect I should not rely on.

Regards,
Matthijs