All about the Strategy, Design, Customisation, Deployment and Development of SharePoint and its related Technologies

  Administration   All Me!! Baby!!   Business   CKS   CQWP   Development   Duffer Moments   Email   Errors   Family   Fixes   General   Groove   How To   How To Code   InfoPath   IRM   Longhorn   Lotus Notes   Migration   Mobility   Office System 2007   Personal Projects   Records Management   Search Server   Security   SharePoint   Silverlight   SQL   Tech Ed 2008   Testing   Vista   VSTO   WSS   XSL

[02/05/2008] My Personal Web Part Project
 
Categories: Development, General, Personal Projects, Office System 2007, SharePoint, WSS
 

Over the past week or so I have started to build a web part that I have been meaning to build for a while. This web part will do the following:

  1. Connect to a site collection
  2. Connect to a site
  3. Connect to a list or library
  4. Connect to a specific view within the list or library
  5. Apply a custom XSL to the returned results
  6. Apply a custom CSS to the returned results
  7. Render a nice looking aggregation web part

This has been a personal project of mine for a while now, it originally started as a CQWP replacement which another version I am working on will become. This version is more about aggregating specific content from views. The reason for this is that over the past year or longer I have noticed that business users are after a simple approach of aggregating content into a page. They like the CQWP but also like "hand-crafting" views on lists and libraries to get the desired results that they need. This web part aims to assist with this not only be allowing users to select the views that they spent ages building but also allow for develops to style the outputted XML by using custom XSL and CSS. So let me show you what it looks like:

 

Once the web part is added to the page you will need to configure it via the tool pane as you would normally with any web part.

 

When the tool pane opens the first configuration section simply is the about bit but also allows you to set the title that you want to appear on the web part once it is rendered on the page.

 

Now we have our title set we need to set the data connections, i.e. the site collection etc that we wish to connect to.

 

This list is populated once you add the web part to the page. Just ignore the empty dropdown lists not very user friendly but it is just the debug version J

Once you have selected the site collection the list of sites is presented:

 

Once you have selected the site or sub site the list of lists and libraries is then populated.

 

At the moment it also shows any system lists and libraries, obviously this would be changed if it was finished. Now we need to select the lists and the view list will be populated:

 

For this I am using a new view I created called "NewsItems". Now we have our data connection and have enabled the "Show Data" option we only need to set the XSL and CSS styles that we will use.

 

The list of XSL styles and CSS can come from a specific library or use the "XSL Style Sheets" location in the "Style Library" of the site collection. The lists are populated by reading the lists and loading the XSL filename or CSS filenames:

 

 

Once we apply the following settings we are then presented with the following web part with the relevant data.

 

It is only in early development and needs improvements in the user interface and also the whole security thing needs sorting out, so nothing too much!! J

Anyway just wanted to get peoples reaction if you like it or you think it is really rubbish let me know. All feedback welcome!!

 
10 Comments
 

Comments

Friday, 2 May 2008 07:49 by EROL
Great !

Saturday, 3 May 2008 01:28 by John
Looks great! Any plan to publish the code?

Saturday, 3 May 2008 10:12 by Tobias Zimmergren
Cheers Liam, Looking good. I like the idea. Keep us posted on further enhancements! Cheers, Zimmer

Monday, 5 May 2008 05:53 by John Haigh
I think this web part is a great idea.. I have been wanting to write something just like it but just haven't had time. My latest curiosity has been how to build a web part like this that can aggregate data for reporting purposes that has data from more than one list where the data from one list depends on another parent list. John

Tuesday, 6 May 2008 02:02 by hassan
Gr8 work mate, would love to see this as a build package. Simple, easy and self explanatory.

Wednesday, 7 May 2008 09:16 by Etienne Legendre
Great Liam. Does this WP works on WSS without MOSS ? EtienneL

Monday, 12 May 2008 09:36 by Liam Cleary
Hi Etienne, Yes it does work with WSS as well as MOSS. :-) Liam

Tuesday, 27 May 2008 04:12 by Jan
Hi Liam, this is looking very promising, any plans on releasing the code? Keep on the good work! Jan

Saturday, 12 Jul 2008 10:05 by aytug akdogan ödüllü 1. seo yarışması ve yurtta barış dünyada barış
It looks very complicated.. P.S: Your image validation isnt seen at Firefox.

Monday, 14 Jul 2008 10:12 by Liam Cleary
Hi, Just a question, how come you sau it looks very complicated? From a technical perspective or from a user admin level? Yeah I know the validation doesn't show, I will be changing the brand shortly so this will be fixed. :-) Liam

Name:

URL:

Email:

Comments: