by Administrator
20. May 2009 03:47
I recently ran into a problem where when I went to edit-mode of my page the number of zone would change. In view mode I had 4 zones and in edit mode i only had two.
This is in a MOSS Publishing site and my first thought was that it had been edited in SharePoint Designer. After confirming that that was not the case, I discovered that someone added zones directly to the content page in the “pages” library, rather than to the underlying layout page in the master page gallery.
I was able to quickly resolve the issue. Hope this helps.
by Administrator
19. May 2009 10:48
I have a customer that would like to allow users to add a webpart on the (i.e. with out Site actions -> Edit Page, etc). What I would like to happen is for any user to be able to select the web part they want and add from any page on the site.
So...
To add a web part in code you can use SPLimitedWebPartManager. You’ll need to specify the page, zone and web part to add... pretty straight forward. Here’s a link that has a code reference: http://blogs.msdn.com/tconte/archive/2007/01/18/programmatically-adding-web-parts-to-a-page.aspx.