Friday, March 12, 2010

Cross Site List RSS Feed with SharePoint DataView (No need for Anonymous Access)

  1. Lets start out by pulling up SharePoint Desinger 2007

  2. Open up your site (in my case I am using MySite)

  3. On the Data Source Library tab on the right portion of the designer

  4. Connect another library in the lower right

  5. Now that you have created a connection to another library you need to "Refresh library" to get the objects to appear

  6. Now your Data Source Library should look like this (image)

  7. We now move on to the list you are trying to hook into. On the Date Source Library select "Connect to a script or RSS feed.."

  8. On the General tab give it a name, in my case "BI Calendar"

  9. On the Source tab the default values are good

  10. Just add the URL for the List RSS feed you want to view
  11. Go to the list, select the action, select "View RSS Feed"

  12. Take the URL and drop it into the "Enter the URL to a server-side script" field
  13. At this
    point if you a specific view that you want to reference you are going to need to
    add the GUID to the view in the above step as well. This was difficult step to figure
    out and I hope I can help save someone else the time I spent on it. Open up the
    view, modify the view and pull out the "&View=" from the URL. This parameter will be used in the server-side script connection to the List RSS Feed. The next step is to add a parameter to the DataView properties. A URL with out the View will look like this: "http://MyServer/_layouts/listfeed.aspx?List=a4a88bd0%2Ddf29%2D4f54%2Da924%2D195be47346ed" and a URL with the View will look like this: "http://MyServer/_layouts/listfeed.aspx?List=a4a88bd0%2Ddf29%2D4f54%2Da924%2D195be47346ed&View=%7B9F3ACEAB%2D75DF%2D4C04%2D83C2%2D3A5733A6CA31%7D"

  14. Go to the the Login tab, in my case we are using the Kerberos so "Use Windows Auth"
    works, not sure what other cases this will work. You may have to play this depending
    on the type of Auth you have setup on your farm. Keep in mind if you enter your
    creds they will be stored in plain text. This is the point in which you get around
    the Anonymous Access part of a List RSS Web Part .

  15. Now we need to add a SharePoint DateView to the page. Insert, SharePoint Controls,DateView

  16. The next step is to link the Server-Side Scripts to the SharePoint DataView web part we just
    added. Right click on the server side scrip you just created in the Data Source
    Library and select "Show Data". This will allow you to do two things, validate the
    the connection is working correctly and view the list of RSS fields that come over
    in the feed

  17. Now scroll down on the Data Source Details tab to the "Item" section. Then select "title &
    pubDate" by holding down your CRTL key.
  18. Then select the "Insert Selected Fields
    as.." drop down at the top of the Date Source Details tab

    This step binds the fields from the RSS feed to the DataView

  19. Go to the DataView and right click edit properties. We want to edit the title and
    convert it into a hyper link.

    Make sure the "Text to display" is {title} and the "Address" is {link}.

  20. Next I clean up the headers on the webpart and the columns
  21. Finally save and deploy.
    You may first see an error page but just select the "refresh page" link and you
    are done (image)


Post a Comment