Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have created a Custom Master Page in VS2010 and deploy Project to SharePoint. First I activated site Collection feature "SharePoint Server Publishing Infrastructure" and then i also activated site feature "SharePoint Server Publishing". After that Under "Look and Feel" category, I click Master page. But in site Master page settings, only site master page v4.master was available but my custom Master page was not listed there.

Can anybody explain why it is not listed there ? Whats missing ??

share|improve this question
1  
Did you create a module, to deploy the master page to the master page gallery? If yes, could you provide also the CAML definition of the module? –  Norbert Dec 13 '12 at 15:36
    
Yes, I create module to deploy master page. But my Master page is not available in master page gallery also. As i am new to SharePoint, Can you please tell me How i can get CAML defination of the Module ? –  SPBeginer Dec 13 '12 at 16:02
    
In Visual Studio, double click on your Module file. It should take you to an Elements.xml file. The part between the <Module>...</Module> tags is what is interesting in this case. –  Norbert Dec 13 '12 at 16:06
    
Thanks! This is: <?xml version="1.0" encoding="utf-8"?> <Elements xmlns="schemas.microsoft.com/sharepoint/">; <Module Name="MasterPage" Url="_catalogs/masterpage" RootWebOnly="TRUE" List="116"> <File Path="MasterPage\AndraAPFonden.master" Url="AndraAPFonden.master" Type="GhostableInLibrary" IgnoreIfAlreadyExists="TRUE" /> </Module> </Elements> –  SPBeginer Dec 13 '12 at 16:18
    
The module definition seems correct. What is the scope of the feature which deploys this module? Did you activate the feature or did you check it's activated? –  Norbert Dec 13 '12 at 16:30
add comment

1 Answer

up vote 2 down vote accepted

This elements file works for newcustom.master, it needs to be a web feature and then published from the master page catalogue. You will need publishing infrastructure at the minimum to activate it also.

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <Module Name="MasterPage" Url="_catalogs/masterpage">
    <File Url="newcustom.master" Type="GhostableInLibrary" Path="MasterPage\newcustom.master">
      <Property Name="MasterPageDescription" Value="This is the master page to use for the new site." />
      <Property Name="ContentType" Value="$Resources:cmscore,contenttype_masterpage_name;" />
      <Property Name="UIVersion" Value="4" />
    </File>
  </Module>
</Elements>

Tested in SandBox and SharePoint Online.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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