Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine > Limit widgets per zone View modes: 
User avatar
Member
Member
lwhittemore-emh - 4/16/2012 1:30:38 PM
   
Limit widgets per zone
Is there a way to limit what widgets are allowed in different user editable zones? So maybe only smaller widgets are able to be added to smaller sized zones and so on.

User avatar
Certified Developer 8
Certified Developer 8
Jiveabillion - 4/17/2012 8:18:00 AM
   
RE:Limit widgets per zone
There is usually a way to do anything you want, but I don't believe that this functionality is built in to Kentico at this time.

You will likely have to write your own solution for this and I do think that it will be a difficult one to make without access to Kentico's source code.

Keep in mind that if you do make changes to something so close to the core functionality of Kentico that you will have to keep close track of them and when you apply hotfixes and updates you will have to merge your changes with any changes that were made to the same files.

My two cents:

If the user wants to put widgets that don't fit in their zones and keep them there, let them do it.

Two possible solutions:

1. Use CSS styles with specific selectors to either modify the layout of the widgets when they are placed inside the smaller zones. If you can't use styles to make them fit,use styles to hide their contents and put a background image that says "This widget cannot be used in this zone. Please remove it".

2. Edit the web parts so that they can detect whether they are in the "forbidden zones" and have them output a message to the user that it can't be used in that zone.

Option 1 would be preferable since it doesn't change any of Kentico's built in code. Option 2 would still be better than changing the core functionality.

User avatar
Member
Member
kentico_michal - 4/18/2012 2:11:38 AM
   
RE:Limit widgets per zone
Hi,

Regrettably, as mentioned in the previous post, this functionality is not supported in the current version of Kentico CMS.

You can try to implement one of the solutions described in the previous post or you can modify the widget selector dialog which is located here ~\CMSModules\Widgets\Dialogs\WidgetSelector.aspx.

In any case, you can suggest this feature here and we will consider it for one of the next versions of Kentico CMS: Kentico User Voice

Best regards,
Michal Legen