Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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:

<TagCloudUserScope>Microsoft.SharePoint.Portal.WebControls.TagCloudUserScope.UnderUrlEveryone</TagCloudUserScope>

<TagCloudUserScope>UnderUrlEveryone</TagCloudUserScope>

<UserScope>Microsoft.SharePoint.Portal.WebControls.TagCloudUserScope.UnderUrlEveryone</UserScope>

<UserScope>UnderUrlEveryone</UserScope> 
share|improve this question

2 Answers 2

up vote 1 down vote accepted

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>
share|improve this answer

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.

share|improve this answer
    
I am using a web template... but web templates still have onet.xml :) –  JohnnyT Dec 4 '12 at 20:25

Your Answer

 
discard

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.