Create a Feature: Master Pages for Site Collections

This article refers to Microsoft Office SharePoint Server 2007 (MOSS
2007) Beta 2 Tech Refresh.   Details are subject to change in the RTM
version.

One way master pages can be stored and used in MOSS 2007 sites is through
creation in SharePoint Designer and storage in the Master Page Gallery.
This method will create a master page in the content database.  But what if
you need to use one or two master page across multiple site collections?  For ease
of updates and maintenance, we don’t necessarily want to store a copy of the master page in
each site collection. Instead we can create and store master pages on the file
system as a SharePoint Feature and make it available for new and existing site collections.

If for some reason you don’t want to create a custom Feature, you can manually work through this process by editing the
default Publishing Layouts Feature that ships with SharePoint.
See

this article here
for instructions.

A huge thanks to my friend Andrew
Connell
for showing me the light on how to accomplish this with a custom
feature. His help was invaluable.

Create a Feature: Add Custom Master Pages to your Site Collections

  1. Navigate to the Features directory on your web server:
    Local Drive:Program FilesCommon
    FilesMicrosoft Sharedweb server extensions12TEMPLATEFEATURES
  2. Locate the PublishingLayouts Feature directory.
    Copy this folder and paste it at the root of Features.
    Rename the folder to a unique name of your choice.  For my example I
    used CustomMasterPages.
    Location of custom feature folder
  3. Open your new Feature directory. At this point you can leave all the
    default folders, or you can choose to clear out what you don’t want to use.
    You only have to keep Feature.xml and
    ProvisionedFiles.xml
    . To create a clean file set, at a minimum
    clear out the contents of each sub folder in the directory (en-us (or your
    language), Images, MasterPages, PageLayouts, Styles).
  4. To start, we need at least one master page file in the Feature folder.
    You can copy one of the existing master pages, paste the copy in the
    directory, and rename the copy to your unique name, or alternately paste
    in your custom master page, or create a new blank file with the extension of
    .master.
    Feature folder contentsTip! To just get a master page going,
    copy the sample code
    from this
    article
    and paste it in your custom master page file.  That will
    get you up and running for this article and give you a good starting point
    for your customizations once the master page has been applied to your site.
    If you do this, after pasting the code into your master page file, locate
    this line of code and add a missing quotation mark:
    <asp:ContentPlaceHolder id=”PlaceHolderTitleBreadcrumb”
    runat=”server”/>
  5. Next, open the ProvisionedFiles.xml file in Notepad or a similar
    editing application.
    Local Drive:Program FilesCommon
    FilesMicrosoft Sharedweb server extensions12TEMPLATEFEATURESYourFeature
  6. We are going to delete out all of the content and only keep the
    OSGMasterPages
    Module tag and the
    PublishingLayoutsPreviewImages
    Module tag.
    As opposed to listing out what to strip out, here is the code you need in
    this file:
    <!– _lcid=”1033″
    _version=”12.0.4407″ _dal=”1″ –>
    <!– _LocalBinding –>
    <Elements xmlns=”http://schemas.microsoft.com/sharepoint/”>
    <Module Name=”OSGMasterPages” Url=”_catalogs/masterpage” Path=”MasterPages”
    RootWebOnly=”TRUE”>
    <File Url=”Sample.master” Type=”GhostableInLibrary”>
    <Property Name=”ContentType” Value=”My Sample Master
    Page” />
    <Property Name=”PublishingPreviewImage” Value=”~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview
    Images/sample.png, ~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview
    Images/sample.png” />
    <Property Name=”MasterPageDescription” Value=”This is
    my sample master page for use with collaboration or publishing sites.”
    />
    </File>
    </Module>
    <Module Name=”PublishingLayoutsPreviewImages” Url=”_catalogs/masterpage”
    IncludeFolders=”??-??” Path=”” RootWebOnly=”TRUE”>
    <File Url=”Sample.png” Name=”Preview Images/Sample.png”
    Type=”GhostableInLibrary”>
    </File>
    </Module>
    </Elements>
  7. Update the properties to reflect the new master page details:
    1. Change the URL to your custom master page.:
      <File Url=”Sample.master” Type=”GhostableInLibrary”>
    2. Change the Preview Images to a custom image:
      <Property Name=”PublishingPreviewImage” Value=”~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview
      Images/Sample.png, ~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview
      Images/Sample.png” />
      Add the custom image to the following directory:
      Local Drive:Program FilesCommon
      FilesMicrosoft Sharedweb server extensions12TEMPLATEFEATURESPublishingLayoutsen-us
    3. Update the Description.  Enter a description for
      your master page:
      <Property Name=”MasterPageDescription” Value=”This is
      my sample master page for use with collaboration or publishing sites.”
      />
    4. Update the image names:
      <File Url=”Sample.png” Name=”Preview Images/Sample.png”
      Type=”GhostableInLibrary”>
  8. Save the ProvisionedFiles.xml file.
  9. Create a preview image in the language folder (in this case,
    en-us
    ).
    Preview image location
  10. Next, open the Feature.xml file in Notepad or a similar
    editing application.
    Local Drive:Program FilesCommon
    FilesMicrosoft Sharedweb server extensions12TEMPLATEFEATURESYourFeature
  11. There are four things you need to edit in this file:
    1. Change the Feature ID to a unique GUID.  You
      can generate GUIDs in Visual Studio (Tools – Create GUID – Registry
      Format – Copy). Paste the new GUID for the ID and remove the curly
      brackets.
      <Feature Id=”FDFCD4C4-F0D9-43b5-8739-A33681049657″
    2. Update the title:
      Title=”Custom Master Pages”
    3. Update the description:
      Description=”Custom master
      pages for use across multiple site collections.”
    4. Change the Hidden state to False:
      Hidden=”False”
  12. Save the Feature.xml file.
  13. Recycle the Application Pool for the site you plan to install the
    Feature on, or reset IIS (Command Prompt – IISRESET).
  14. You are now ready to install the new Feature on the web server. Open a
    Command Prompt and enter the following:

    1. Change directories to the BIN folder in the
      12
      hive so you can use STSADM.exe:
      cd C:Program FilesCommon FilesMicrosoft
      Sharedweb server extensions12BIN
    2. Launch STSADM and install the feature:
      stsadm -o installfeature -name
      YourFeatureDirectoryName

    Tip! To access STSADM quicker, refer to

    Andrew Connell’s SharePoint Developer Tip
    .

  15. Now we will activate the feature on the site.
    1. Open your site and navigate to the Site Collection Features settings
      page. Site ActionsSite Settings
      Modify All Site Settings
      Site Collection Features (under the Site Collection
      Administration
      submenu).
    2. The new feature will be listed:
      Custom feature in Feature list
    3. Select Activate.
  16. The master pages are now ready to use on the site. Navigate to the
    Master Page settings by selecting Site Settings in the
    breadcrumbs and choosing Master Page. (Or Site Actions
    Site Settings
    Modify All Site Settings
    Master page (under the Look and Feel submenu).
  17. Depending on your requirements, in either or both the Site
    Master Page
    setting and the System Master Page setting, select your drop down box and choose your custom master page.

    Master page selection drop down

    1. Select OK.
  18. The master page is applied to the site.  Note that I manually
    added the “Sample Master Page” text to the Sample.master file. It will not
    appear on yours by default.

    Sample Master Page

 

Adding to our Feature: Adding More Custom Master Pages to your Feature

If you ever need to add new master pages to this feature, you can edit the
Feature and redeploy it.  Alternately, you can create a new Feature for
each custom master page. For that scenario, just follow the steps above for
creating a new feature. The following outlines how to update your Feature with
new master pages.

  1. Navigate to your custom master page Feature directory and add the
    appropriate files for your new master pages.
  2. Navigate to and open the ProvisionedFiles.xml file.
    Add a FILE tag block for each new master page for both the
    OSGMasterPages Module and the
    PublishingLayoutPreviewImages
    Module.  Save the file.
  3. Recycle the Application Pool for the site you plan to install the
    Feature on, or reset IIS (Command Prompt – IISRESET).
  4. You are now ready to reinstall the updated Feature on the web server. Open a
    Command Prompt and enter the following:

    1. Change directories to the BIN folder in the
      12
      hive so you can use STSADM.exe:
      cd C:Program FilesCommon FilesMicrosoft
      Sharedweb server extensions12BIN
    2. Launch STSADM and install the feature:
      stsadm -o installfeature -name
      YourFeatureDirectoryName -force

    Tip! To access STSADM quicker, refer to

    Andrew Connell’s SharePoint Developer Tip
    .

  5. Now we will deactivate and reactivate the feature on the site.
    1. Open your site and navigate to the Site Collection Features settings
      page. Site ActionsSite Settings
      Modify All Site Settings
      Site Collection Features (under the Site Collection
      Administration
      submenu).
    2. Your existing feature will be listed:
      View of Active Feature
    3. Select Deactivate.
    4. A warning message will appear.  Select Deactivate the
      feature
      .
    5. The Feature list will reload.  Select Activate
      next to your custom feature.
  6. Your new master pages are ready for use.

 

In my next article I will cover what to do next with your custom master
page and how do you start customizing it.

90 thoughts on “Create a Feature: Master Pages for Site Collections”

  1. This worked great, but I haven’t been able to figure out how to get the references to my images and style sheets correct once I create the Custom Master Page.The page was functional when loaded in the traditional method, and is available across site collections once I followed your instructions, but where do I put my css & image files on the server? Current tag is: <SharePoint:CssRegistration name=”<% $SPUrl:~SiteCollection/Style Library/~language/Core Styles/db_CDPH.css%>” runat=”server”/>Thanks Much!!

  2. It seems to work well except for 2 problems. Since there is a bug in MOSS 2007 that does not allow you to delete master pages that have already been referenced it is impossible to update the master page by deactivating the feature and reactivating. Additionally the master page doesn’t work initially. It comes up with an error that it “Cannot convert type Microsoft.SharePoint.WebControls.ScriptLink to System.Web.UI.IAttributeAccessor “. Now if I open up sharepoint designer and check out the file and save it then it works. I guess it has something to do with ghosting imcompatibilities. Did you run across this?

  3. Hi Heather,Your instructions were great! The one thing I am struggling with is how to ensure the utility pages, i.e. create new document library, can also inherit my custom master page. Any ideas?Thank you. Keep up the great work!

  4. I followed your method from the beginning. I was able to complete upto 14 steps (launch STSADM and install the feature). The operation was succesful, but I could not see my master page listed in the site setting-site features. What could have gone wrong & what do i need to do to see it listed

  5. Great site! Loved the walkthrough but I can’t get it to work. When I finally activate the feature and set it as the Master Page, I get an error on the site home page that says Error – File not found.I wish it would tell me which file, cause I can’t figure out which one is missing.

  6. Hello and great work by the way!Do you have an example for creating page layouts as features? Looking at the provisioned file the section for layouts are slightly differnt. I have tried and followed the same instruction for the Master page but the provisioned xml code has more.Any help would be greatly appreciated,M. Howard

  7. I liked the walkthrough I am able to activate the feature and attach the master page.I have created master page for team site and registered in global folder, and worked fine but when I activated the publishing site feature of site collection it restored back to the default.master page.Can you please suggest me how to retain the custom master page after activating the publishing feature of the site

  8. hi i follow the above document but i can’t find the “Open your site and navigate to the Site Collection Features settings page. Site Actions – Site Settings – Modify All Site Settings – Site Collection Features “please help me………thank you

  9. HiDoes anyone have problem reactivating a feature after deactivating – I have this problem on “Routing Workflow” standard feature? Help will be much appreciated

  10. Hi HeatherI have been trying to use the new VSeWSS site templates. when i create a new project a e Provisioning handler is created for me. In this class I tried to set my new custom master page using the following code.using (SPWeb web = (SPWeb)properties.Feature.Parent){ web.MasterUrl = web.ServerRelativeUrl + “/_catalogs/masterpage/kims.master”; web.Update();}I also tried to set the custommasterurl prop instead, but the result is always the same.File not found errorI saw this code work when Mike Ammerlan presented at the office dev con on the beta 1 og 2 product?Do you have any idea to how, this can be done programmaticallyRegards Carsten Nielsen

  11. Hi, it is a Great site!i am have a question/How i can add master page to the portal site collection (no to the publishing site collection)i am not have the Site Actions –> Site Settings –> Modify All Site Settings –> Master page tool for change the MP

  12. Hi Heather!We followed the directions and we can see and apply our master page, but we don’t get our preview image to display on a “Site Master Page Settings” page. Our discriptive text does show up. can you give us any idea why?Thank you!

  13. Heather, this is great info. Thx a lot!But….I have a small issue.I created a new Feature/master page and I assigned it as the default master. Everything works just fine…but only after a user clicks on the Sign In link on the top right side.If you don’t click on the Sign In link the pages are displayed with the default SharePoint design. I’ve been trying everything possible to have my master page show up but no luck. Is it the ghost-unghost issue?

  14. Hi Heather,Is it possible to attach two custom master page with a website.My problem is I have 2 master pages. One for the Home page and another for other pages. How can I create web pages from different master page in Moss.RegardsSam

  15. Carsten,I had the same issues. It appears that SharePoint Designer makes minor changes to the URL that your MasterPage is referencing for the CSS file. Once I had a working masterpage in the site (not deployed via feature), I switched to code view and copied all of the code out of the .master file and created a new blank custom.master page in my feature directory using Notepad. I then simply pasted all of my working code into this file, deployed the feature, and everything worked fine.

  16. Hi, Great article. It worked fine when I tried this on my Custom Master page.However when I tried the same along with the css and images used within the Master page, it failed and just gives me File Not Found error. I have added the images to the respective folder in my custom feature and even declared them in provisionedfile.xml. The feature was installed sucessfully and it was activated on the site.But after applying the masterpage nothing seems to work as it should be.I tried to open the site in designer and found that the images are in there under the site.I have no clue as to where I went wrong.Any help will be greatly appreciated.

  17. Hi Heather!Great stuff!I am having the same problem as vijay above…I followed your method from the beginning. I was able to complete up to 14 steps (launch STSADM and install the feature). The operation was succesful, but I could not see my master page listed in the site setting-site features.Any tips?

  18. i got File Not Found Error, when i modified the default.master page with my sample.master page.Could any one help me regarding this.

  19. I had the same problem as DVD. Did anyone come up with a solution?————————————————————————DVDPosted @ 3/22/2007 11:03 AMGreat site! Loved the walkthrough but I can’t get it to work. When I finally activate the feature and set it as the Master Page, I get an error on the site home page that says Error – File not found.I wish it would tell me which file, cause I can’t figure out which one is missing.

  20. I am having the problem posted by vijay on 3/22/2007. I have created the feature and installed it and received the message that it installed successfully. But when I view the features list in the admin, I don’t see the new feature displayed in the list.

  21. Hi Heather,I´m a newbie in Sharepoint 2007, and i followed your example to build my custom master page. I used blueband.master to do it, but now i’m having a problem with the css, my master page is going to some css styles that i don´t know what are they. For example, i was trying to customize the <SharePoint:AspMenu ID=”logoLinkId” …>, i change the color, but now it has some blue color that i can’t find out where it is… Can you please help me? I know the css that blue band use is band.css and controls.css but this is not here. Is there anything that i’m forgetting?Thanks for your help!Cris

  22. Hi I am having same problem as Vijay,Jonathan and Kathleen. Any one has any Idea what is the fix for it? Tham You

  23. Hi I am having same problem as Vijay and Kathleen. I have all the steps but unable to see new feature in Master Page list.Any help please ?

  24. Hi Have faced a problem like Meera File Not found when i select my custom master pages. Kindly please let me know what is the problemArul Vivekananth

  25. Hi Meera Vist this like for your problem ( File not found Error )http://blogs.conchango.com/arulvivekananth/archive/2007/08/01/Create-a-Feature-_2D00_-Master-Page.aspx

  26. Excellent!!! Thank you so very much!There were a couple of stumbles, but I worked around them:On Step 15, the option for Master Page for the site (under the Look and Feel section of Site Settings) will not appear unless you have activated the Office SharePoint Server Publishing Infrastructure. Once that featured was activated all went smoothly.

  27. I am working on sharepoint for my company and this is a intranet site. This site has one homepage and the rest are sites of each department. I uploaded different colors of templates for each sites homepage but it only effect the front page. Once i click on other link like List or Discussions it will go back to old template. if i go back to home it has new template. is there any way i can set this template for whole site no matter where i click. i worked on this through sharepoint designer. I am working on sharepoint 2007. Please i really need help with this.

  28. It seems to work cavity except for 2 problems. Since there is a bug in MOSS 2007 that does not allow you to delete master batmans that take a premium already been referenced it is impractical to update the master flyleaf by deactivating the feature and reactivating. Additionally the master copyboy doesn’t work at first. It comes up with an error that it “Cannot convert type Microsoft.SharePoint.WebControls.ScriptLink to System.Web.UI.IAttributeAccessor “. Now if I activate up sharepoint designer and cage out the file and save it past it drive train. I guess it has the top to do with ghosting imcompatibilities. Did you run across this?

  29. I completed this several months ago. It works great. After I create a new site collection I go to site settings and turn the feature on. After I turn it on, I then see the new masterpage and can select it.The only problem is that the masterpage is not inherited when I create additional sites underneath the site collection. It defaults to default.master and I have to select my new master over again. On the Site Master Page Settings I get the following errors.The site master page setting currently applied to this site is invalid. Please select a new master page and apply it The system master page setting currently applied to this site is invalid. Please select a new master page and apply it. Any one experienced this. Help needed.

  30. I have used the above mentioned steps for creating a custom master page feature. I am able to install the master page feature and it is visible to my Collaboration portal. But when I try to apply it to my Site collection, MOSS generate error: An error occurred during the compilation of the requested file, or one of its dependencies. The type or namespace name ‘Publishing’ does not exist in the namespace ‘Microsoft.SharePoint’ (are you missing an assembly reference?) I have customized the master page using the default.master not using the above mentioned. Please help.

  31. If you are UPDATING a file (such as a CSS file or image), the steps outlined in the “Adding to our feature” do not work. What I found is that you need to delete the files that need updating from the Style Library (on the “All Site Content Page”) before deactivating and reactivating the feature. This will force SharePoint to repopulate the files that have been changed to the Style Library.This seems pretty awkward IMO… if anyone has a better way of doing this, let me know.

  32. I still have problem in creating and using new master pages. I can’t set any master page other than template ones. I followed the mentioned actions in this article, But with no success. Although the site feature is activated and the page is listed in roll-up window, but actually it dose not work. When I set the sample.master as site master page and then click home breadcrumb, I get an error message “file not found”. As another alternative, I’ve tried to change one of template masters such as BlackBand.master,but even with just adding a row of table, the file comes out of use and I get the same error message. So I don’t know where the problem is. At this time I’m working on an Intranet web site, so I have kept some web parts on site and I’ve changed the navigation bar. I want to know if there is any special point that must be considered in my master page. I have another question about your article. As one of steps, a unique Feature ID is needed. I couldn’t find Tools->Create Guide in visual studio, so I reset my settings to General settings. Now the link is appeared but in disable status. what’ the problem? Should I get and copy the generateguide.exe manually?

  33. Heather,Thanks for this article! It’s a life saver. I followed to the letter and everything works well until I change the master page. Then I see this error:An error occurred during the compilation of the requested file, or one of its dependencies. The type or namespace name ‘Publishing’ does not exist in the namespace ‘Microsoft.SharePoint’ (are you missing an assembly reference?) If I upload the master page manually to the master page gallery it works fine. Have you seen this before?

  34. Matt, if you’re still facing the problem with the ‘Publishing’ namespace, check out my blog (either linked here or through google, just look for “tom meskens on complete randomness”). Basically, you’re using something that uses publishing features, but you’re using a master page that isn’t suited for this and you need to import the correct assemblies to make it work.Good luck!

  35. Matt, if you’re still facing the problem with the ‘Publishing’ namespace, check out my blog, I’ve got a possible solution for it there. Basically, you’re using something that uses publishing features, but you’re using a master page that isn’t suited for this and you need to import the correct assemblies to make it work.Good luck!

  36. It seems to reside cavity except for 2 problems. Since there is a bug in MOSS 2007 that does not approve you to delete master batmans that yield a donative already been referenced it is impractical to update the master running title by deactivating the complexion and reactivating. Additionally the master copyboy doesn’t park at former. It comes up with an error that it “Cannot churchite type Microsoft.SharePoint.WebControls.ScriptLink to System.Web.UI.IAttributeAccessor “. Now if I impel up sharepoint designer and cage out the chaining and save it past it appliance snuff. I have a hunch it has the top to do with ghosting imcompatibilities. Did you run beyond this?

  37. Thanks for this nice article!I am having a trouble though. Basically I want to do exactly the same as you are doing here, but I have some more CSS, Java Scripts and Images referred from the master page. now, for an example, my master page is referring a CSS using the following syntax<SharePoint:CssRegistration ID=”CssRegistration1″ name=”<% $SPUrl:~SiteCollection/Style Library/~language/Core Styles/myCustom.css%>” runat=”server”/>Now how I will refer this myCustom.css file into the meta file ProvisionedFiles.xml? I meant do i need to do something special so that this css files will be available from the above mentioned URL?I need to do the same for some javascripts and some images as wel.I will greatly appreciate if you spend a min answering this. i need this badly. thanks much!

  38. Hi,This text was useful to me. But i am facing a very different problem. I followed the steps mentioned in here. Until installing the feature using STSADM was OK. When I tried to navigate to Site Actions -> Site Settings -> Modify All Site Settings -> Site Collection Features the page showed me unauthorized access page. Can anybody tell me what must have gone wrong?ThanksSibi

  39. Hi,It’s really a great article, but that I don’t know how to make is add a control (not a master page). I have a page in the (mySite) section, and I need this control to appear each time I create or open MySite.Thanks in advance…

  40. Do you have the next article posted referred to in this article: In my next article I will cover what to do next with your custom master page and how do you start customizing it.

  41. Hi,I have my MOSS server in Farm environment. I have one App and one Front end server where MOSS is installed. Where should i install the feature?Thanks and Regards,Sanjay Patel.

  42. It comes up with an error that it “Cannot convert type Microsoft.SharePoint.WebControls.ScriptLink to System.Web.UI.IAttributeAccessor “. How to solve this problem.

  43. “Cannot churchite type Microsoft.SharePoint.WebControls.ScriptLink to System.Web.UI.IAttributeAccessor “. Now if I impel up sharepoint designer and cage out the chaining and save it past it appliance snuff. I have a hunch it has the top to do with ghosting imcompatibilities. Did you run beyond this?

  44. This is great! Thank you Heather.I noticed a tiny issue in deploying StyleSheets with the feature. There is a ‘caching’ issue when including the style sheets from the content database in SharePoint. The style sheets seems to get stored as an actual document on the clients machine.Therefore, say we apply changes to the style sheets in the feature (filesystem), those changes will not be apparent on the users machine, unless “temporary internet files” are deleted from the client machine. Refreshing the page alone does not seem to do the trick. Now if i were to store the files in the “/_layouts/1033/styles” directory, then everything performs as expected, refresh the page and changes are apparent.Would it be wiser for me to deploy the feature inside of an actual SharePoint Solution package, so that we can deploy the Style Sheets directly to the “/_layouts/1033/styles” directory.

  45. I re-installed a feature to customize the master page for non-publishing sites (…xyz.com/sites/…) When I try to activate the feature, I receive the “file not found” error. I did some digging and found out the following:1. When I coded the feature to set the MasterUrl and CustomizedMasterUrl values I used this code: site.ServerRelativeUrl + “/_catalogs/masterpage/mypage.master”. 2. When I turn on the feature on each subsite, a masterpage gallery is create (for each path of the Serverrelativeurl)3. If I go the the specific site (…/sites/sub1/sub2/sub3….), click SiteActions, Site Settings, select masterpage under gallery column; the master pages for that subsite (sub1, sub2, sub3, etc…) are listed.4. I deleted these files and re-applied the feature.5. Now the feature works. The master page is re-loaded into the individual gallery for sub1, sub2, sub3, etc..) It appears that there was already a reference in the individual masterpage galerry that was refering to the wrong place.6. I should have used “/sites/<only next level subsite>” + “/_catalogs/masterpage/mypage.master”. Ex. “/sites/sub1/_catalogs/masterpage/mypage.master” for all locations beneath this one. This way only one masterpage gallery is created. If you need to manually delete, only delete once.can someone post sample code to manage each individual masterpage gallery via code?

  46. Thanks Heather. I was having a problem, and fixed the problem from reading this post. Thanks for helping me out with out even lifting a finger.

  47. I followed step by step and the Master Page shows in the root URL “/” in the site collection list but the URLS in the site collection list “sites/someotherurl” you still have to apply it for every seperate site collection. Yes the content and all subsites and pages added under the root url apply a new version of the master page but if you use sites or mysites you have to apply a new master page to every one manually or write a .Net app to do so. I was looking for something that would apply one master page gobally to anything in the entire SharePoint instance. But still a good article if this is what you are looking for.

  48. Hi,This seemed a common problem from reading the above posts. Everything went well up to stage 14, but my feature is not appearing in Site Settings > Site Features, so I cannot activate it….Any help would be great!Thanks.

  49. Hi Heather,I tried the instruction above (thank you for sharing), but for some reason when I applied the master page I get a “File not Found” error. Is there any thing specific I should be looking for? I looked everywhere and everything seems to be there. Thank you in advance!

  50. Hey thanks a lot for the article, i followed the instructions and it worked perfectly for the master page! Sorry for post above me, i am not quite sure what your problem is.

  51. Regarding “Cannot churchite type Microsoft.SharePoint.WebControls.ScriptLink to System.Web.UI.IAttributeAccessor “, I think the issue is a bug in SharePoint possibly something to do with caching or VirtualPathProvider The workaround is to check out and check back in the master page either manually or programmatically.

  52. It did crash on stage 7 which caused a problem, I then re-booted and re-ran the installation it works fine, thanks for the help in the comments.

  53. Master pages really have cut down the development and updating time for our webdevelopment efforts. We have seen a lot of cost savings using master pages. However, we have not yet used your approach on our real estate websites. We will definite try saving them as a Sharepoint feature.

  54. I was looking for something that would apply one master page gobally to anything in the entire SharePoint instance. But still a good article if this is what you are looking for.

  55. You have made an excellent work to gather such information, ranging myself useful! Thank you

  56. We just started this real estate site. We will use this master page concept. Hopefully we can reduce our development cost and development time with this approach.

  57. Followed all the steps and all worked jsut fine. Used Visual Studio 2008 to create / modify the files. Thanks for the informative article.

  58. Hi,I created a masterfile in a directory named “James”One problem I’m having is trying to uninstall this feature. I deactivate it,uninstall it and remove the feature(directory James) from the feature directory.When I try to view a workflow I get the error “Failed to find the XML file at location ’12TemplateFeaturesJamesfeature.xml’.I’ve searched the web for a way to fix this with no luck.Any help is appreciated.Thanks

  59. Thanks for this article! It’s a life saver. I followed to the letter and everything works well until I change the master page.If I upload the master page manually to the master page gallery it works fine.

  60. Hi,Thanks for this article.I just want to modify one parameter in the default.master.I want the parameter : MaximumDynamicDisplayLevels was equal to 4 instead of 1 by default. I want this modification take effect for all my existing sites and the future site I will create.Please I want to know how I can do this.Thank you very much for you’re help

  61. We are trying to use more master pages to improve our development times and reduce the cost of this development. A master page allows us to make our websites look more consistent and easier to edit. We have not yet looked at SharePoint. We will try this out. Thanks for your article.

  62. I had only problems with SharePoint. I wanted to use the same template for all pages, but it didn´t work.

  63. Thank god for this article. It really has helped me. All the other ones that you can find in the net are crap!!

  64. It’s really a great article, but that I don’t know how to make is add a control (not a master page). I have a page in the (mySite) section, and I need this control to appear each time I create or open MySite.

  65. for those with the file not found issue, I know I get this error when the control templates link on the master drop out the “~/_” usually when I save in SPD not connected to the server.<%@ Register Tagprefix=”PublishingNavigation” Namespace=”Microsoft.SharePoint.Publishing.Navigation” Assembly=”Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c” %><%@ Register TagPrefix=”wssuc” TagName=”Welcome” src=”~/_controltemplates/Welcome.ascx” %>so that it reads src=”_controltemplates/Welcome.ascx” which causes File not Found or error. Adding the tilde and slash fixes the issue. Dunno if this is the issue here, though. Just sayin! If I get file not found for the master, that’s the first thing I check.

  66. “Failed to find the XML file at location ’12TemplateFeaturesJamesfeature.xml’.”I have the same error, i really don’t understand ?If someone could help me ??Thanks a lot.

  67. Thank you SO MUCH for this awesome and clear explanation of deploying master pages. It’s very hard to find good clear concise explanations on these Sharepoint processes. Keep up the great work!Tom

  68. Hi Heather,Your blog is so helpful.I’m having some trouble and could use some help.I have a large number of site collections, and I’d like to apply a master page to all of the site collections. I can create a feature and activate it on site collections one-by-one, but I need to do it for way more sites than I can do one-by-one.So my end goal:1. Apply my “Custom Master Pages” feature to the few hundred site collections.2. Activate those features on all of the site collections3. Select my “Custom.master” as the master page on all of these.Any ideas? Thank you thank you thank you!Ryan

  69. Hi,I got the problem with the masterpage “Cannot convert type Microsoft.SharePoint.WebControls.ScriptLink to System.Web.UI.IAttributeAccessor ” until i go into sharepoint designer and check out, check in. Has anyone figured out a work around for this? Im using it for mysites and need to create over 1000 mysites so its not really viable to log into SPD on every one of them to check out n check inheheThanks in advance!!

  70. Heather, Between you and Andrew Connel, I’ve learned more about SharePoint than any of the books in my library. Thank you so much for taking the time to keep your page updated. With SharePoint 2010 on the brain, organizing clients who went with wss 2.0 and 3.0 has been a challenge. So, thanks for shining the flashlight when most of the book authors out there are only writing about the basics.Justin Walker

  71. Hi, It is a great article for the beginners in WCM. I just wanted to know, how can we deploy the page layout along with the master page.will it work by just adding the page layout file in the masterpages folder and add module “OSGPageLayouts” into ProvisionFiles.xml.Kindly guide me to find the solution. Thanks in advance.Regards,Abhishek Verma

Comments are closed.