Collapse or Expand SharePoint web parts in your pages: get OpenCloseWps

Wednesday, 22 April 2009 14:42 by myro

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:

wpinstall

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:

wpprops

The OpenCloseWps will load the necessary JavaScript code to perform the trick and your Web Parts will be fully expandable / collapsible:

wpworks 

 

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)

Currently rated 3.3 by 6 people

  • Currently 3.333333/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:   ,
Categories:   SharePoint 2007
Actions:   Bookmark and Share | Permalink | Comments (1) | Comment RSSRSS comment feed
If you consider this post usefull for your purposes, please consider visiting my sponsors to help me out with the myrocode.com maintenance. Thank you.

Comments