I'm trying to create a site definition that uses a custom master page.
I created a module in VS, called MasterPages
, in which there are two folders (one inside another): _catalogs, masterpage.
Within this folder i put my custom master page, socialfeed.master
.
This is my Elements.xml Module configuration:
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Module Name="MasterPages" RootWebOnly="TRUE" Url="_catalogs/masterpage">
<File Path="MasterPages\_catalogs\masterpage\socialFeed.master" Url="socialFeed.master" Type="GhostableInLibrary" IgnoreIfAlreadyExists="TRUE" />
</Module>
</Elements>
And this is how i bind my custom master page on my site definition's default page:
<%@ Page language="C#" MasterPageFile="~/_catalogs/masterpage/socialfeed.master"
I can actually deploy the solution without any problems but when i try create and access a new subsite based on that definition i get an error:
Error=The file /_catalogs/masterpage/socialfeed.master does not exist.
Could you please help me understand where is the problem?