简体   繁体   中英

Upgrade page layout with sharepoint feature

I use sharepoint 2010. I have a feature which contains some pages layout. When the feature is activated, page layout are applied. But when I deploy a new version of this feature with a new version of pages layout, page layout aren't take into considerations because they have the same name.

How can i do this ?

Your page layouts won't update because they're unghosted, ie customized in the Master Page Gallery.

It has nothing to do with the files having the same name unless you've explicitly set IgnoreIfAlreadyExists to FALSE in your elements.xml in the feature.

If your solution doesn't contain any important pages yet (development server or otherwise), the simplest solution is the following:

  1. Delete the page layouts, (making sure no pages reference the page layouts in question, else you won't be able to delete them.)
  2. In Central admin, uncheck "Allow Site Collection Administrators to Customize Master Pages and Layout Pages" ( see http://blogs.msdn.com/b/steve_fox/archive/2010/03/08/ghosting-unghosting-in-sharepoint-2010.aspx for details).
  3. Redeploy your solution

See also http://blogs.technet.com/b/wbaer/archive/2007/08/10/ghosts-in-the-machine.aspx for a thorough explanation of ghosting and unghosting in SharePoint

Hope this answers your question.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM