Based on this post founded in Path to SharePoint, I have created a SharePoint Web Part called SharePointOpenCloseWps that once installed in your SharePoint page, it let’s you choose which Web Parts you want to make collapsible. The OpenCloseWps allows you to choose what web part should be collapsible by configuring OpenCloseWps’s property named “Web Part names to make collapsible”. In this post you will find the source code and the intaller.
The solution is built using Visual Studio 2008 and WspBuilder (if you don’t know what is WspBuilder, get it and try it!) and can be easily installed running a batch file.
Installation
Download the sourcecode and navigate to “\SharePointOpenCloseWps\bin\deploy\SharePointOpenCloseWps”, run deploywithstsadmOnLocalhost if you want to install it on http://localhost/ or edit the file and add your SharePoint site’s url. Once the batch has completed, go to your “web parts gallery” under your site collection’s “Site Settings” , clicck new and add OpenCloseWps.webpart:
Next, go to your SharePoint page, add the web part, and edit the property named “Web Part names to make collapsible” under Settings. Insert the titles of the Web Parts that you need to make collapsible and press Apply:
The OpenCloseWps will load the necessary JavaScript code to perform the trick and your Web Parts will be fully expandable / collapsible:
Please note that only one OpenCloseWps is allowed in the same page. If you have questions let me know..
Download OpenCloseWps SharePointOpenCloseWps20090422214413.rar (503.89 kb)