Tag Info

Hot answers tagged

3

There is not direct way to check if site was unsuccessfully provisioned programmatically. For a workaround after successful provisioning of site or in web provisioned event , you can create a web property like "WebProvisioned" and check that property in your code. If it does not exist, delete that site and create again.


2

The Search Center is a dedicate site template, with its dedicated onet / webtemp entries & definition. You could easily add one to your site collection by creating a subsite with the template SRCHCENTERLITE#0 / SRCHCENTERLITE#1 or SRCHCEN#0. Alternatively, you could inject the key search webpart within a dedicated page like in your code sample. You'll ...


2

I think that you should not to add web part to the page directly, instead of it you should use web part provision. You can start your research from this posts: Provisioning Custom WebPart in SharePoint 2010 tricks Provision a WebPart using a SharePoint Feature Provision publishing page with webpart in sandboxed solution


2

Try web.ListTemplates["Events"] or web.ListTemplates[106]. SPListTemplateType enumeration


2

We have only discussed this internally but not created an actual solution yet. Here are some of the thoughts I have on the subject: I would probably opt for a pattern with a provider hosted app that create the site collection using the correct master page etc. This means that you could host on your own IIS on-premises, and when you move it to the cloud you ...


2

Modules with RootWebOnly="TRUE" will only deploy the files to the Rootweb of the Site Collection and it requires that the feature is Site scoped. If you try to deploy a module with the RootWebOnly="TRUE" property to a Web then it won't work as SharePoint expects the target to be of SPSite and not SPWeb. Thus your attempt to deploy the file to url ...


1

Up until April 2014 Cumulative Update for the SharePoint 2013 release only Office 365 and SP Online supported the provisioning of site collections remotely using CSOM extensions (part of the Windows PowerShell for SharePoint Online package). This set of functionalities was not available for on-premises (or Office365-Dedicated). With April 2014 Cumulative ...


1

Here are very good examples to add Xsltlistviewwebpart programmatically. http://www.c-sharpcorner.com/UploadFile/sagarp/programmatically-adding-xsltlistviewwebpart-inside-panel-in/ http://sharepointnadeem.blogspot.in/2012/08/programatically-add-xsltlist-view.html http://damneddutch.blogspot.in/2012/08/programmatically-create-sharepoint.html Sample code: ...


1

The state of the features is probably being cached between your two Features.Add lines. I would first move the line that adds the site collection feature so that it occurs before opening the SPWeb. Secondly, if you are still seeing issues with it being cached, open the site collection a second time to do the SPWeb feature. For instance: ...


1

When provisioning Discussion Board it is required to specify ContentTypeID attribute for View element as demonstrated below: <View List="Lists/Discussion" BaseViewID="3" WebPartZoneID="WebPartZone2" DisplayName="Discussion" ContentTypeID="0x012001" /> where ContentTypeID value is set to 0x012001 (RootOfList)


1

Courtesy of Microsoft tech support, this article - Programmatically Provisioning Wiki Pages with Content and Web Parts in SharePoint 2010 - gets me much closer to what I wanted in the first place: a way to provision a WikiPage with code and some clear markup. I'm going to give this a spin in the next few days. Since the above seat-of-the-pants method ...


1

Timer service was stopped and in Manual. Starting the Timer Service, solved this issue.


1

I know this question was asked a while ago now, but for anyone else with a similar problem, I would personally avoid using the site template approach. Perhaps a better solution (IMO) would be to create a separate site-scoped feature as suggested by Ted N.. The Web App scoped feature would still create the new site but could also activate any site-scoped ...


1

I would use a site templates for this, you can then just make your top level site off of it, and have everything encapsulated. It would also house your custom pages etc, doing everything from a single point. (Easier to make as well).


1

It would be nice to know which kind of problems you experience. But at Least I can see following possible issues: It seems as if you don't define Site Columns and ContentType before List Definition You're missing listing all the FieldRefs in Schema.xml


1

I guess your confused with $Resources:core, You can access them from 12 hive, In my case they are all located in this folder location C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\Resources This Link might help you Resorces in 12 hive


1

Try to execute this code with a domain account who has privilege on your SharePoint Farm. In which context do you run this code ? via an event receiver ? feature activation ?


1

If you look at C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\FEATURES\PublishingLayouts\ProvisionedFiles.xml it contains the PageLayouts for publishing which is provisioned like: <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <Module Name="OSGPageLayouts" Url="_catalogs/masterpage" ...



Only top voted, non community-wiki answers of a minimum length are eligible