3

Within my site definition i added module for the deployment of a theme.

The feature gets deployed, but when I activate it the theme is not available for selection?

I have included my elements.xml and not sure what is wrong? help?

Module Name="ThemeElement" Url="_catalogs/theme" RootWebOnly="true" Path="Themes">

File Url="SP.thmx" Type="GhostableInLibrary" IgnoreIfAlreadyExists="FALSE" />   

/Module>

this is the SharepointProjectItem.spdata file for completeness

ProjectItem Type="Microsoft.VisualStudio.SharePoint.Module" DefaultFile="Elements.xml" SupportedTrustLevels="All" SupportedDeploymentScopes="Web, Site" xmlns="http://schemas.microsoft.com/VisualStudio/2010/SharePointTools/SharePointProjectItemModel"> Files>

ProjectItemFile Source="Elements.xml" Target="Theme\" Type="ElementManifest" />
ProjectItemFile Source="..\Theme\SP.thmx" Target="Theme\" Type="ElementFile" />

/Files>

/ProjectItem>

dave
  • 447
  • 1
  • 12
  • 23

2 Answers2

2

Here's how to do it:

  1. Create a Module SPI
  2. Set Url for the element to _catalogs/theme, List to 123 and RootWebOnly=true
  3. Add the thmx file to the Module SPI and set the Type attribute on the element to GhostableInLibrary
  4. Add it to a Site Collection scoped feature
  5. Voila!
0

Deploying custom themes is covered as part of the Advanced SharePoint Developer Training for SharePoint. Please check it out if that helps you:

http://www.bing.com/videos/watch/video/sharepoint-2010-user-interface-improvements-and-extensibility/10twboclq

Ashish Patel
  • 11,385
  • 3
  • 22
  • 29