Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Custom Master page

  Asked By: Mark    Date: Feb 22    Category: Sharepoint    Views: 1198

I am trying to publish a custom site definition that has a custom master
page associated with it. When I create a new site, it says that it cannot
find the master page. Is there someplace special that I need to place the
master in the 12 hive to make sure that it is found by the site definition?
Currently it is located in TEMPLATE\Site Templates\site def
folder\masterpage.master.

Any help would be great.

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Aditiya Kapale     Answered On: Feb 22

Wherever you place  it in the 12 hive, you need to add an additional
<Module> element to the site  definition that ghosts the custom  master
page to the master  pages gallery of the site. You also need to set the
MasterUrl attribute of the <Configuration> element in the site
definition to point to your new masterpage. Finally, make sure you
reference the Module you created in the Modules section of the
configuration to invoke it when the site is provisioned. A sample
Module element that would copy the masterpage.master from the root of
the custom Site definition  is listed below:

<Module Name="AddMasters" Url="_catalogs/MasterPage" >

<File Url="masterpage.master" Type="GhostableInLibrary"
IgnoreIfAlreadyExists="True"/>

</Module>

The MasterUrl property for this master would be
"_catalogs/MasterPage/masterpage.master".

 
Answer #2    Answered By: Joanne Greer     Answered On: Feb 22

Here is a snapshot of my ONET.XML file. It looks like I have the same
information that you said to put in there, but when I create  the new site,
it still says that the master  page cannot be found.

<Configurations>

<Configuration ID="-1" Name="NewWeb" />

<Configuration ID="0" Name="Default"
CustomMasterUrl="_catalogs/masterpage/DGSExtranet.master">

<Lists>

<List FeatureId="00BFEA71-E717-4E80-AA17-D0C71B360101" Type="101"
Title="$Resources:core,shareddocuments_Title;"
Url="$Resources:core,shareddocuments_Folder;"
QuickLaunchUrl="$Resources:core,shareddocuments_Folder;/Forms/AllItems.aspx"
/>

<List FeatureId="00BFEA71-6A49-43FA-B535-D15C05500108" Type="108"
Title="$Resources:core,discussions_Title;"
Url="$Resources:core,lists_Folder;/$Resources:core,discussions_Folder;"
QuickLaunchUrl="$Resources:core,lists_Folder;/$Resources:core,discussions_Fo
lder;/AllItems.aspx" EmailAlias="$Resources:core,discussions_EmailAlias;" />

<List FeatureId="00BFEA71-D1CE-42de-9C63-A44004CE0104" Type="104"
Title="$Resources:core,announceList;"
Url="$Resources:core,lists_Folder;/$Resources:core,announce_Folder;">

<Data>

<Rows>

<Row>

<Field Name="Title">$Resources:onetid11;</Field>

<Field Name="Body">$Resources:onetid12;</Field>

<Field Name="Expires"><ows:TodayISO/></Field>

</Row>

</Rows>

</Data>

</List>

<List FeatureId="00BFEA71-2062-426C-90BF-714C59600103" Type="103"
Title="$Resources:core,linksList;"
Url="$Resources:core,lists_Folder;/$Resources:core,links_Folder;" />

<List FeatureId="00BFEA71-EC85-4903-972D-EBE475780106" Type="106"
Title="$Resources:core,calendarList;"
Url="$Resources:core,lists_Folder;/$Resources:core,calendar_Folder;"
QuickLaunchUrl="$Resources:core,lists_Folder;/$Resources:core,calendar_Folde
r;/Calendar.aspx" EmailAlias="$Resources:core,calendar_EmailAlias;" />

<List FeatureId="00BFEA71-A83E-497E-9BA0-7A5C597D0107" Type="107"
Title="$Resources:core,taskList;"
Url="$Resources:core,lists_Folder;/$Resources:core,tasks_Folder;"
QuickLaunchUrl="$Resources:core,lists_Folder;/$Resources:core,tasks_Folder;/
AllItems.aspx" />

</Lists>

<Modules>

<Module Name="Default" />

<Module Name="DGSExtranetMasterPage" />

</Modules>

<SiteFeatures>

<!-- BasicWebParts Feature -->

<Feature ID="00BFEA71-1C5E-4A24-B310-BA51C3EB7A57" />

<!-- Three-state Workflow Feature -->

<Feature ID="FDE5D850-671E-4143-950A-87B473922DC7" />

</SiteFeatures>

<WebFeatures>

<Feature ID="00BFEA71-4EA5-48D4-A4AD-7EA5C011ABE5" />

<!-- TeamCollab Feature -->

<Feature ID="F41CC668-37E5-4743-B4A8-74D1DB3FD8A4" />

<!-- MobilityRedirect -->

</WebFeatures>

</Configuration>

</Configurations>

<Modules>

<Module Name="Default" Url="" Path="">

<File Url="default.aspx" NavBarHome="True">

<View
List="$Resources:core,lists_Folder;/$Resources:core,announce_Folder;"
BaseViewID="0" WebPartZoneID="Left" />

<View
List="$Resources:core,lists_Folder;/$Resources:core,calendar_Folder;"
BaseViewID="0" RecurrenceRowset="TRUE" WebPartZoneID="Left" WebPartOrder="2"
/>

<View
List="$Resources:core,lists_Folder;/$Resources:core,issues_Folder;"
BaseViewID="0" WebPartZoneID="Left" WebPartOrder="3" />

<AllUsersWebPart WebPartZoneID="Right" WebPartOrder="1"><![CDATA[

<WebPart xmlns="http://schemas.microsoft.com/WebPart/v2"
xmlns:iwp="http://schemas.microsoft.com/WebPart/v2/Image">

<Assembly>Microsoft.SharePoint, Version=12.0.0.0,
Culture=neutral, PublicKeyToken=71e9bce111e9429c</Assembly>


<TypeName>Microsoft.SharePoint.WebPartPages.ImageWebPart</TypeName>

<FrameType>None</FrameType>

<Title>$Resources:wp_SiteImage;</Title>


<iwp:ImageLink>/_layouts/images/homepage.gif</iwp:ImageLink>


<iwp:AlternativeText>$Resources:core,sitelogo_wss;</iwp:AlternativeText>

</WebPart>

]]></AllUsersWebPart>

<View
List="$Resources:core,lists_Folder;/$Resources:core,links_Folder;"
BaseViewID="0" WebPartZoneID="Right" WebPartOrder="2" />

<NavBarPage Name="$Resources:core,nav_Home;" ID="1002"
Position="Start" />

<NavBarPage Name="$Resources:core,nav_Home;" ID="0" Position="Start"
/>

</File>

</Module>

<Module Name="DGSExtranetMasterPage" Url="_catalogs/masterpage">

<File Url="DGSExtranet.master" Type="GhostableInLibrary"
IgnoreIfAlreadyExists="True"/>

</Module>

</Modules>

 
Didn't find what you were looking for? Find more on Custom Master page Or get search suggestion and latest updates.




Tagged: