Tag Info

New answers tagged

0

You can deactivate a feature with the following code: web.Site.Features.Remove(new Guid("GUID_OF_YOUR_FEATURE"), true); Add the code after adding the web part (line 38 in your code).


1

You simpy have to define a Control inside your element file and specify "AdditionalPageHead" as the Control Id. <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <Control Id="AdditionalPageHead" Sequence="1001" ControlAssembly="fully qualified assembly name" ControlClass="namespace qualified name of the control class"/> ...


1

Here is the simplest step-by step guide. You only need to create feature that will specify, what to put into AdditionalPageHead placeholder. This feature then could be activated(installed) in the any site (mysites site as well).


0

It's not possible to create site collection scoped event receivers. What you need is "Feature Stapling". You can connect a site or web scoped feature to a certain site template. So in your case you create a site scoped feature that contains the code to manipulate the home page of the root web. If you also want to activate that kind of modifications on all ...


0

I think you create an event receiver scoped to Web Events and fire it when A Site is being provisioned and A site was provisioned. How to Attach an Event Receiver to the Web Added Event And For What Purpose How to: Programmatically Activate a Feature


0

After posting this I found it in the Root Site "Site Elements" List.



Top 50 recent answers are included