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 am facing an issue regarding deactivating a feature which is having some page layouts. I am removing the page layout from the folder.

Here comes the problem, when I am trying to delete a page layout which is used to create a publishing page then I am not able to delete that page layout which is causing showing the page layout into the publishing page creation wizard after deactivating the feature.

Is it possible to do some workaround so that if I deactivate the feature then the page layout also will not display into the creation wizard.

Thanks.

share|improve this question
add comment

2 Answers 2

up vote 2 down vote accepted

You can hide Page Layouts as part of Site Setting > Look and Feel > Page Layouts...

Here is link on how to do it in code...

http://blog.aide-sharepoint.com/index.php/2011/04/cacher-pages-layouts-par-code/

share|improve this answer
add comment

If all you are looking to do is hide the page layout do as Chris suggested.

If you want to delete the page layout you will first have to change any page that is currently using that page layout so it uses a different page layout. As long as a page layout is being used you can not delete it (even if you deactivate a feature that installs it).

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.