Link to home
Start Free TrialLog in
Avatar of rajasoorya_kc
rajasoorya_kcFlag for India

asked on

How to change master page of default.aspx in a site template

Hi,
I have a custom site template definition which has a default.aspx. I want to use a different master page instead of the default one. How can this be done??
Avatar of NubianRugby
NubianRugby

Avatar of rajasoorya_kc

ASKER

I tried both the URLs and also http://www.sharepointkings.com/2008/05/how-to-set-custom-master-page-as.html.
But nothing seems to work out.
Also lets say you created the site based on your custom site template. Goto site settings and in Master page you can change it to whatever you like.
I did all the changes as suggested and i still see that my page is picking the "BlueBand.master" as the master page. But i dont see the reference in any of the "onet.xml" files. Why is "BlueBand.master" being picked?
I think i found what the issue is. I sense that Url="_catalogs/masterpage" in the modules tag is actually looking for the master page in the path _catalogs/masterpage of the site instead of the sitecollection.

How can i give a relative path to refer to the _catalog/masterpage of the sitecollection?
<Modules>
  <Module Name="CustomTemplateCustomMasterPage" List="116" Url="_catalogs/masterpage" RootWebOnly="FALSE" Path="">
    <File Url="default.master" Type="GhostableInLibrary" IgnoreIfAlreadyExists="TRUE" /> 
  </Module>

Open in new window

Did you try adding the URL of your site collection inside [Path=""]?  I would try that first.
No I didnt.
My question may sound dumb, but a rookie to moss. When you say "URL of the site collection" are u talking about the http://... url or some relative path?
There are no dumb questions, only dumb answers.

I was talking about the http://site.collection.com/site1/ URL
ASKER CERTIFIED SOLUTION
Avatar of rajasoorya_kc
rajasoorya_kc
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Congrats on locking this down yourself!