Document Library Search Web Part (Optional)
Posted by zieglers on September 13, 2009
This post contains the optional part of Document Library Search Web Part post: https://zieglers.wordpress.com/2009/09/08/document-library-search-web-part/
In this post, I’ll try to show,
- How to bind a SharePoint document library to ListName instead of ListId,
- How to modify SPDataSource, so that subsite document libraries can be searched recursively,
- How to extend search scope to other columns by adding more parameters.
Binding a SharePoint document library to ListName instead of ListId
In order to do this, you can simply follow this post: http://blog.solanite.com/keith/Lists/Posts/Post.aspx?ID=3
Idea is very simple: Search web part definition for ListID, replace it ListName. Then look for GUID and replace it with the list name you want to bind to.
Replace ListID with ListName
Replace GUID with list name you want (For our demo, list name was Documents in the previous post)
Note: In some cases, there might be brackets around GUID value. If this is the case, make sure your list name is not in brackets after you perform replace operation.
That’s it. Now, your data view web part is bound to ListName instead of ListID.
Modifying SPDataSource so that subsite document libraries can be searched recursively
to be continued.