SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there any way to restrict a web part to a certain zone? I know I can restrict it by using the AllowZoneChange flag, but is it possible to make sure the web part can only be added to certain zones? I have some web parts which are only viable in a wide column (zones), so I want to make sure that no one tries to add the web parts to narrow columns (zones). Is there any way of accomplishing this?

share|improve this question
up vote 3 down vote accepted

If you stick in a Quick Add Group with the same name as your "wide" one, it'll show up at the top of the list by default when someone tries to add a web part in that zone.

However, it will show up as normal further odwn the list when someone tries to add to another zone.

However, I don't think it's actually possible to do this at all - the only method I can think of, off the top of my head is to (somehow, maybe through modifyin the page layout directly) add some code to an event handler for SPWebPartManager.WebPartAdded to check the webpart and the zone, and to remove it if it was added in the wrong zone.

However, I've never tried to do this, nor know if it would work - feel free to give it a try though. Blog about it if you do get it to work!

Have a look at this for info on the event itself.

share|improve this answer

I agree with James, I don't think it can be done easily. You can grant it the ability to change or not to change. Once a user places it on a page, they'll know quickly where to put it, to me it seems to be more work than is needed.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.