Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Custom Master Page for all Sites: Feature Site Template Association

  Asked By: Bryon    Date: Jul 14    Category: Sharepoint    Views: 2468

Can we do the following to assign a custom master page to all the sites in the
site collection?

1. Write a feature, say Feature 1, to assign the master page in a particular
site to a custom master page.
2. Write a feature, say Feature 2, which uses "Feature Site Template
Association" to assign Feature 1 to all the site templates

When we install and enable Feature 1and Feature 2, will all the sites be
having the custom master page associated to them?

If this works, What are the advantages and disadvantages in using this kind of



1 Answer Found

Answer #1    Answered By: Rudy Francis     Answered On: Jul 14

The flaw in this plan would be #2. Although you could do this Feature
Site template  Association would associate the Feature with the site
template. All sites  created after this would receive the MasterPage,
but already created sites would not receive the new MasterPage. You can
assign a custom  master to a site  Definition without needing to write  a
Feature to do it. But the limitation still is that it only applies to
Sites created after you add the code for the MasterPage.