Home RSS 2.0 ATOM 1.0  CDF  
 
CodeSegment - Carlos Segura Sanz (blog)
 
UPDATED New Version 2

This is my new webpart, in that I have worked in order to solve a common problem. The Rollup for Sharepoint lists.

With this webpart you can rollup any list in any site, you can get data from different lists (Tasks, Announcements, your customs lists)

The Webpart check the security so that if a user does not have access to a site or a list these data will not appear.

Webpart gathers data from the specified lists and join it in a common xml that later will render it using xsl.

Webpart properties

  • Lists

List of comma delimited values that signify the sites and lists
Format: /site/subsite:ListName, /site/subsite/subsite:ListName

  •  Fields

List of comma delimited values with the field names
Format: Title,Text,Comment,User
All the fields must exist in all the lists. You can put different lists but the fields must exist. 

  • XSL

XSL to render the result

  • Debug XML

If checked you can view the collected xml data

 

 

The XML is formatted as

<?xml version="1.0" encoding="utf-8" ?>
<
Rows>
   <
Row>
     <
_ListTitle/>
     <
_ListUrl/>     <!-- Url to default view -->
     <
_SiteTitle/>
     <
_SiteUrl/>     <!-- Url to site -->
     <
_ItemID/>
     <
_ItemUrl/>     <!-- Url to list item view -->
     <
Field/>        <!-- Each one of the specified fields -->
  
</Row>
<
/Rows
>

XML debug output.

Results once applied the xsl 

The XSL used in the sample

<?xml version='1.0' encoding='utf-8'?>
<
xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<
xsl:output method="html"/>

<
xsl:template match="/">
   <table class="ms-summarycustombody">
     
<tbody>
        
<xsl:for-each select="Rows/Row">
              
<xsl:sort select="_SiteTitle"/>
              
<tr>
                
<td class="ms-vb" width="50%" style="padding-bottom: 3px">
                  
<span class="ms-announcementtitle">
                   
<a href="{_ItemUrl}">
                     
<xsl:value-of select="Título"/>
                   
</a>
                  
</span>
                
</td>
                
<td width="50%">
                  
<p align="right">
                    
<a href="{_SiteUrl}">
                     
<xsl:value-of select="_SiteTitle"/>
                    
</a>
                   
<xsl:value-of select="Caduca"/>
                  
</p>
                
</td>
              
</tr>
              
<tr>
                
<td class="ms-vb" colSpan="2">
                  
<xsl:value-of select="Texto" disable-output-escaping="yes"/>
                
</td>
              
</tr>
         
</xsl:for-each>
        
</tbody>
      
</table>
<
/xsl:template>
<
/xsl:stylesheet>

UPDATED New Version 2

Thursday, August 11, 2005 1:27:47 AM (Hora de verano romance, UTC+02:00)
I am a real novice. I got involved with Sharepoint and I want to use csegrollup for our site. My background in xml, xsl, xslt, et al is almost nill. I would really appreciate a complete example of how to pull and present data for Shared_Documents list that contains the following fields
TYPE; NAME; MODIFIED; MODIFIED BY; CHECKED OUT TO; BRIEFDESCRIPTION. Would want to see the lists
from each subsite. Using csegrollup2 I set sites to /sites/sysadmin.freight.fedex.com/:Shared%20Documents/Forms/AllItems.aspx Then select all sites. Where I am absolutley confused is how to generate the xsl. Would really appreciate (if you have the time) an example that includes the
xsl code I need to get it to work. I firmly believe after I get through that one example working I will be able to generate all the others I need. YOUR ASSISTANCE would be greatly appreciated.
dave d. 408.323.4355
Dave Dionne
Tuesday, October 04, 2005 4:05:53 PM (Hora de verano romance, UTC+02:00)
I am new to web part development. If you could provide me with the source code for the csegrollup web part it will be a good starting point for me. If you could do this help it will be much appreciated.

bye
Ram
ramprasadsugumaran@coop-systems.com
440-570-8867
Ram Sugumaran
Friday, August 04, 2006 4:46:27 PM (Hora de verano romance, UTC+02:00)
I am using csegrollup control 5.5 . How do I get connected to the Xml Data that is passed to this control at run time using VB.NET
Kehinde
Comments are closed.

Copyright © 2008 Carlos Segura. All rights reserved.