2

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

1 Answer 1

2

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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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