I'm trying to add a Tag cloud web part to my site definition's onet.xml file and set its userscope to everything under the current url.

I understood from Microsoft I cannot simply export and import the web part because its not supported by v3 schema (its not a asp.net based web part). I exported a DWP file from the web part gallery and added it to my onet.xml and everything is fine.

The problem is I cannot understand how to set the userscope using the v2 schema. In v3 its quite simple. You have a parameter called UserScope and there sits the definition. In v2 i tried all the following settings without any success:





2 Answers 2


I'm sure you found a workaround for this by now. I'm posting this for anyone still looking for the answer. All you need to do is use the correct namespace: "urn:schemas-microsoft-com:sharepoint:TagCloudWebPart"

<UserScope xmlns="urn:schemas-microsoft-com:sharepoint:TagCloudWebPart">UnderUrlEveryone</UserScope>

Is there a reason you need to use site definitions? Site Definitions are generally a bad idea and introduce real dependency issues over time. Using WebTemplates are almost always a better idea.

here are a few good resources:
http://msdn.microsoft.com/en-us/library/aa979709(v=office.14).aspx http://blogs.msdn.com/b/vesku/archive/2010/10/14/sharepoint-2010-and-web-templates.aspx

There are a lot of advantages, but the main one is that you can get the same level of customization without introducing a dependency to the custom site definition, instead it will reference a standard site definition making the upgrade and maintenance process easier.

Typically I'll add the web parts to the page as part of a feature receiver using the object model.

  • I am using a web template... but web templates still have onet.xml :) Dec 4, 2012 at 20:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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