2

I have just a small Question: Can I tell a feature with scope "Web" only to be activated on the RootWeb in Feature.Template.xml?

Something like

RootWebOnly="TRUE"

I have a listInstance (ConnectionLibrary) and a module with RootWebOnly="TRUE". Sure i can just change the scope to site and remove the RootWebOnly attribute, but i don't want to. I'm just curious if its possible to do that.

2

Set the scope to Scope="Site" and in the code make sure that whatever changes you make always point to SPContext.Current.Site.RootWeb(). If done correctly, it should only affect the rootweb as wanted.

0

I think it's impossible to do that, but it means that you want to do something on the site collection (the root web is the root of the site collection).

0

Logically, I am not sure if this is possible or not. May be we can restrict our code to SPContext.Current.Site.RootWeb() only but still..

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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