Reputation: 11
I am quite new to SharePoint and have been given an interesting problem to solve. My users have requested to each have a custom home page that they can customise with ease. The design I have been given is to have an almost blank page with space for 4 webparts organised in a 2 by 2 fashion (2 webparts by 2 webparts) each with a big '+' button in witch to click to select and add a widget of their choosing without having to play around with the ribbon. This is expected to look something like this:
http://imageshack.us/photo/my-images/841/homepages.jpg/
Now when a user clicks a '+' a SharePoint dialog is to be displayed allowing the user to choose from all available web parts. On selecting one the home page is refreshed and the widget is displayed in the selected zone.
I am currently trying to de-risk this request to see if it is possible to achieve in the time frame given. The problems I have at the moment are as follows:
I would really appreciate any help or advice on this. Thanks in advance and sorry if the question is well phrased, this is my first Stack Overflow question!
Upvotes: 1
Views: 397
Reputation: 52
Just create a webpart that does that. Render a big plus sign and when a user clicks there, the event handler gets all webparts available and renders it to a dropdownlist for instance. The rest is easy, when a user selects one, get it (by guid/name whatever) and add it to the zone where the first webpart was present, not forgetting to remove the plus sign webpart from the clicked webpart zone first. This can be achieved using the SPLimitedWebPartManager.
The tricky part could be the Webparts that are available on the SiteCollection, but you could research on that.
Regards,
Pedro
Upvotes: 0