Tag Info

Hot answers tagged

11

A Site Template is essentially a WebTemplate, just pre-packaged. It's NOT a Site Definition. If you would like to distribute it "globally" in your farm, crack the WSP open and edit the Feature and set the scope to Farm (instead of Site). (Quck and dirty solution) Even better is to crate a Web Template of your own and copy and paste pieces from the Site ...


6

You can import your WSP into Visual Studio, using special project type, "Import SharePoint Solution Package": Microsoft provides walkthrough on how to do this: http://msdn.microsoft.com/en-us/library/ee231603.aspx And what about web templates, I recommend you to check out this awesome post from @Chris Beckett: ...


5

There was a big discussion in the SharePoint community a while back on site definitions. The conclusion was that things tend to work out better if you use: a minimal site definition Features which are stapled to your minimal site def This gives a more modular implementation of your customizations, though occasionally some things need to be done in the ...


5

You basically have to create a custom SPWebEventReceiver and activate your mandatory feature under "WebProvisioned" method, like this: public class YourWebEventReceiver : SPWebEventReceiver { public override void WebProvisioned(SPWebEventProperties properties) { base.WebProvisioned(properties); // Activate your ...


4

As part of the publishing features you can add AvailableWebTemplates and AvailablePageLayouts declaratively as feature properties in onet.xml: <Feature ID="22A9EF51-737B-4ff2-9346-694633FE4416"> <!-- Publishing --> <Properties xmlns="http://schemas.microsoft.com/sharepoint/"> ... <Property Key="AvailableWebTemplates" ...


4

Have you had a chance to look over the following link? http://blogs.msdn.com/b/vesku/archive/2010/10/14/sharepoint-2010-and-web-templates.aspx#sitetemplate "One of the consideration with the site templates is also the fact that unless you import them to Visual Studio and modify its settings, they are only available on site collection level (site collection ...


3

And how about site template creation approach? This will produce a sandboxed solution (wsp-file), which can be deployed to any other site. Unfortunately, this approach is not always a good solution for localized or deeply customized sites, because it is very static (and maybe some other issues). So, what else can you use: 1. XML modules In SharePoint ...


3

I would pass on a custom site definition and use the new WebTemplate element with features. Everything you have listed can be done with a WebTemplate - sounds like it can even be deployed as a Sandbox solution. Here is a link to my blog post on Web Templates. http://bit.ly/iNCC6s


3

You can control this with the publishing navigation feature. Take a look at the InheritGlobalNavigation key. <WebFeatures> ... <Feature ID="541F5F57-C847-4e16-B59A-B31E90E6F9EA"> <Properties xmlns="http://schemas.microsoft.com/sharepoint/"> <Property Key="InheritGlobalNavigation" Value="true"/> <Property ...


3

PROBLEM SOLVED :-) :-) The bug of trying to set the xsllink property through the template seems to be a recognised bug. I'm even sure MS are aware of this as when looking at how they have created their site definitions it seems pretty uninstinctive. The Solution DO NOT SET OR DEFINE THE XSLTLISTVIEWWEBPART IN THE TEMPLATE instead just define a webpart ...


2

http://blog.brianfarnhill.com/2009/02/associating-workflows-programatically/ I have been working on a site that will be using some custom workflows ... I want to associate these workflows as part of the site creation process ... to do this I created a feature with a receiver class and used code to add the workflow.


2

Well, given enough time, you can figure things out with SharePoint... Here is what appears to be happening. In ONET, I also had CAML to provision some lists (here is the Announcements one): <List FeatureId="00BFEA71-D1CE-42de-9C63-A44004CE0104" Type="104" Title="$Resources:core,announceList;" ...


2

The order that features are provisioned are: first OOB site collection (site) scoped features are activated in the order specified in onet.xml, then site collection scoped stapled features are activated in random order (beware of race conditions). Then site (web) scoped features are triggered in the order defined in onet.xml, now site scoped stapled features ...


2

Upgrading artifacts depends on the type of artifact in question, and depending on the platform (MOSS vs SP2010). In SharePoint 2010 question the story is different than in SharePoint 2007, since you have feature upgrade, both declaratively and programmaticly (feature upgrade event handler with parameters set declaratively). Further info regarding feature ...


2

You can't have resources files in webtemp*.xml files... Those are already localized with the folder that contains them. For example, check the file webtempsps.xml in the path C:\Program Files\Common Files\microsoft shared\Web Server Extensions\12\TEMPLATE\1033\XML. You will see that every string literals are in fact real string, and not in the format ...


2

Hard to tell which image you are referring but most likey it is a URL that should have been specified by the user and not part of site definition. If you are referring to site's logo image, it may have been specified in the "Title, description and icon" page under site settings. that would browse you to _layouts/prjsetng.aspx


2

It's right to customise it when your business requirements state the need to do so ;) I've recently also came across the concept custom provision providers, which allow you to control the site provisioning process from managed code, allowing very granular control over your site creation. There is also the possibility to just create a site template (.stp) ...


2

I would say that, if your site is a custom one, go with the site definition, it is easier to set, to manage and to deploy. If your feature needs to be attached to built-in site definitions, go with the site stapling, if your feature is not changing the base nature of that site definition. The big problem with the feature stapling, is that it gets confusing ...


2

This happens if you have Web Parts defined in your Page Layout. As soon as the Page Layout gets deployed, the Web Parts are being extracted out of the Page Layout and managed by the Web Parts Framework. Because the Page Layout gets modified in this process, the "unghosted" status remains. Other explanations can be an incorrect @Page-Header or following ...


2

Open the feature that includes the project item and expand the files node on the project item to verify the files that are included with the item. I suspect that your elements file will not be displayed. You need open the properties for the elements file (open the file and click F4), and make sure that the type on the file is set to "ElementManifest".


2

Agree on Chris, custom web templates is the way to go in SP2010! You can define list instances declaratively. Actually they work the same way as custom web templates: in your list instance element in your element manifest use the CustomSchema property to make SharePoint disregard the OOB list template and use your schema instead. See a description here on ...


2

SharePoint MCM Mirjam van Olst has written everything about the provisioning order: http://sharepointchick.com/archive/0001/01/01/site-definition-provisioning-order.aspx Bottom line is that building pages with web parts using Site Definitions is very complex, and often leads to bad solution designs. I would suggest that you look into using WebTemplates ...


2

This has been quite a wild goose chase! There definitely was a mistake in cmscore.es-ES.resx, however, it's fixed in the service pack for the language pack: http://www.microsoft.com/download/en/details.aspx?id=26621 I had no idea that a service pack was available for the language packs; it makes sense because SP1 and the CUs didn't address any ...


2

Run the following code in your C# Console Application and you'll get the listing all your sub-sites with their respective site definitions using (SPSite ospSite = new SPSite("http://server/")) { SPWebCollection webs = ospSite.AllWebs; foreach (SPWeb web in webs) { try { string template = web.WebTemplate; ...


2

It is not possible. All webs have site definition. The name of definition you can get by this code: string id = string.Format("{0}#{1}", web.WebTemplate, web.Configuration) To see what definition is used you can compare result string with values in this post.


1

There are several issues that I see. You need to use the <ContentType> element instead of the <ContentTypeRef> element if you are going to add additional fields to the OOTB Item Content Type. Using ContentTypeRef will use the content type as it is defined already in the site collection. Using the <ContentType> element will allow you to ...


1

Hmm I got exactly this working on another setup. What permissions are you running your cmd-let with? Make sure he has the privileges to execute the code in question (eg. full control of web application). Also post your webtemp xml. I have seen discrepancies before, but that was when provisioning providers from webtemp xml was involved.


1

Please, check, if the ListInstance1 item is added into your feature (in feature designer) Also, I can recommend you to check out this awesome Visual Studio Plugin, made by Microsoft MVP Waldek Mastykarz: http://blog.mastykarz.nl/easier-working-sharepoint-project-items-mavention-spi-references/ This could help you to work with project items in Visual ...


1

Good question. No perfect answer. You can use this tool : http://spdeploymentwizard.codeplex.com/ It is written by the famous SharePoint MVP Chris O'Brien. Internally, is used the content migration API. It may be a good solution. Creating a console app from scratch that will do the import/export is quite difficult. There are so many different cases.


1

What I have seen is that the page is not reverted back to the site definition if the icon still appears. The only way I was able to fix this was to rename the page using the windows explorer view of the master page gallery. I then deactivated and reactivated the feature that put the layout in the gallery in the first place.



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