Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I've created a custom page layout for a search center, and seem to be stuck with the fact that by default, a search center is limited to a subset of approved page layouts. Upon initial deployment of the solution you have to go to 'Site Template and Layouts' and add the new custom layout to the list of layouts the site is allowed to use.

Ideally I'd like to automate this process as part of the feature activation event receiver... is this possible?

Screenshot

share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

Yup, via a FeatureReceiver, call PublishingSite.SetAvailablePageLayouts()

http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.publishing.publishingweb.setavailablepagelayouts.aspx

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.