Friday, December 28, 2007

My first SharePoint webpart

A few months ago I created my first SharePoint webpart.
The conceptual idea was to have a webpart where items from the contenttype calendar would be aggregated and displayed to the enduser in the form of an eventlist.
Something like:
EvenementenWebPart01
When the users clicks on an item, a new page would be displayed with more information about the selected event.
Something like:
EvenementenWebPart02

1st step in creating this WebPart was to find out what components are involved.
So the WebPart will do the following basic steps every time it is viewed.
1. Get all the listitems (based on a public property's "SiteName" and "ListName" )
2. Sort the listitems
3. Cut the list to the appropriate size (based on a public property "NumberOfEvents")
4. Transform the list to an appropriate XML representation
5. Transform the XML representation by using a XLS (based on a public property "XSL")
6. Additionally if an event happens in the future, add a link to an InfoPath form where the user can subscribe to the upcoming event. This form will be forwarded by email.

Next time I will post some short pieces of code.
For now I just send you to this great resource on how to build your own WebPart for SharePoint

No comments: