tag:blogger.com,1999:blog-5634441641513879577.post8777145263574669816..comments2023-06-06T01:58:23.959-07:00Comments on SharePointers: Programmatically Update Page LayoutsPaulhttp://www.blogger.com/profile/05424579499113928113noreply@blogger.comBlogger10125tag:blogger.com,1999:blog-5634441641513879577.post-17753282944198073172009-09-28T06:28:36.486-07:002009-09-28T06:28:36.486-07:00Guys you dont have to do this. The pagelayouts are...Guys you dont have to do this. The pagelayouts are stored in a list. If you get a SPListItem object representing your particular page layout you can basically uncustomise it.<br /><br />Here is some sample code:<br /><br /> using (SPWeb web = site.OpenWeb())<br /> {<br /> SPList list = web.GetCatalog(SPListTemplateType.MasterPageCatalogjasearhttps://www.blogger.com/profile/12343047238631696575noreply@blogger.comtag:blogger.com,1999:blog-5634441641513879577.post-21162433450661968692009-08-03T11:36:43.840-07:002009-08-03T11:36:43.840-07:00Manotas,
No, we haven't had to deal with that...Manotas,<br /><br />No, we haven't had to deal with that issue, however a workaround (off the top of my head) would be to create a custom field that would track last modified date and the name of the person who did the modification and then add an event receiver that, when the item was updated, would check to see if the user was the System Account and ignore it, otherwise it would add the Paulhttps://www.blogger.com/profile/05424579499113928113noreply@blogger.comtag:blogger.com,1999:blog-5634441641513879577.post-4740173930971011162009-08-03T09:02:14.091-07:002009-08-03T09:02:14.091-07:00Hi,
We're using a similar approach to update ...Hi, <br />We're using a similar approach to update our layouts.<br />The issue we're facing is due to the fact that at the bottom of pages the name and date of last modification si displayed, but since this update process is done by the System account, all other data is overwritten during the checking and approuving of the new layout... <br />Did you figure out something about this ?Manotashttps://www.blogger.com/profile/02635216669213844478noreply@blogger.comtag:blogger.com,1999:blog-5634441641513879577.post-46754268646483233242009-05-28T21:30:35.433-07:002009-05-28T21:30:35.433-07:00Excause me, I'm student developer and I don't the ...Excause me, I'm student developer and I don't the above concept. <br /><br />I would requre the coding of FullWidthContentWithTitleV1.aspx<br />and <br />FullWidthContentWithTitleV2.aspx <br />for in-deep investigation.<br /><br />could you please share these?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5634441641513879577.post-63535324693313064282009-05-28T21:30:25.331-07:002009-05-28T21:30:25.331-07:00Excause me, I'm student developer and I don't the ...Excause me, I'm student developer and I don't the above concept. <br /><br />I would requre the coding of FullWidthContentWithTitleV1.aspx<br />and <br />FullWidthContentWithTitleV2.aspx <br />for in-deep investigation.<br /><br />could you please share these?OnMingnoreply@blogger.comtag:blogger.com,1999:blog-5634441641513879577.post-10407287388044153972008-11-24T02:15:00.000-08:002008-11-24T02:15:00.000-08:00I am using a solution package, but not the tool st...I am using a solution package, but not the tool stsdev. I use stsadm to install my packages.<BR/><BR/>I have actually found a workable solution to this, using this blog post:<BR/>http://neganov.blogspot.com/2007/12/master-page-deployment-through-features.html<BR/><BR/>I can upload my updated file and check it in. I am just working on how to approve it in the same feature receiver.<BR/><BR/>Mark Stokeshttps://www.blogger.com/profile/06359908173937775199noreply@blogger.comtag:blogger.com,1999:blog-5634441641513879577.post-22105870852735068532008-11-21T09:01:00.000-08:002008-11-21T09:01:00.000-08:00Mark,So I take it you aren't using a solution pack...Mark,<BR/><BR/>So I take it you aren't using a solution package? In the future I would definitely suggest doing that. <BR/><BR/>What you want to do is basically what I describe in the above post. You'll have to give your new file a new name and add it to the Page Layout Gallery. As long as the new page layout uses the same content type as the old page layout you can do a layout swap (eitherPaulhttps://www.blogger.com/profile/05424579499113928113noreply@blogger.comtag:blogger.com,1999:blog-5634441641513879577.post-76838138811490821632008-11-21T02:15:00.000-08:002008-11-21T02:15:00.000-08:00Thanks for the reply.All I am trying to do is over...Thanks for the reply.<BR/><BR/>All I am trying to do is overwrite the page layout file. At the moment, this doesn't get overwritten. I have to manually upload, check in and approve the page layout.<BR/><BR/>I am not using STSDev in my project, so need to find a way to provision the file.<BR/><BR/>Thanks for the reply though.<BR/><BR/>Mark<BR/><A HREF="http://sharepointstudio.com" REL="nofollow"Mark Stokeshttps://www.blogger.com/profile/06359908173937775199noreply@blogger.comtag:blogger.com,1999:blog-5634441641513879577.post-65103543640852564252008-11-20T09:13:00.000-08:002008-11-20T09:13:00.000-08:00Mark,In my case I'm reprovisioning with a new file...Mark,<BR/><BR/>In my case I'm reprovisioning with a new filename (you might want to do that if you are eliminating columns). If you don't want to do that then don't specify a new name for the existing file in your provisioning file. If you simply want to update/overwrite just do an stsdev -upgradesolution.<BR/><BR/>Hope that helps.Paulhttps://www.blogger.com/profile/05424579499113928113noreply@blogger.comtag:blogger.com,1999:blog-5634441641513879577.post-70541079819086692212008-11-20T08:50:00.000-08:002008-11-20T08:50:00.000-08:00Thanks for this post. I am trying to sort out thi...Thanks for this post. I am trying to sort out this same issue, but have a question.<BR/><BR/>Do you deploy the page layout twice? So we will always have 2 pagelayout for each one in the masterpage library?<BR/><BR/>If so, can I create the page layout once in my project and just provision it twice with different names? or do you have 2 copies of the page layout in your project?<BR/><BR/>I am Mark Stokeshttps://www.blogger.com/profile/06359908173937775199noreply@blogger.com