Stump the Panel » Site Managers and Site Collection Managers

Display List of Document Libraries in a Webpart

(15 posts)
  1. hrussell
    Member

    Is there a way to display a list of document libraries (just the links to the document libraries themselves, not documents within) from a particular site in a webpart? Something like a webpart that displayed a version of the Documents section of VASC (../_layouts/viewlsts.aspx?BaseType=1) would be fine. Any thoughts?

    Posted 1 month ago #
  2. I've never tried with CEWP or DVWP, but I think since that page already exists for every site, I might make this into a javascript solution that works like my preview page for the DispForm.

    Where/how did you want to display this data?

    Posted 1 month ago #
  3. hrussell
    Member

    I just wanted to display it in a webpart on the homepage of a site. One of our users has some data that she is separating into a number of document libraries, and will keep adding/removing libraries. She knows she can keep a manual links list, etc., but I was hoping there was a more automated way.

    Can you point me to your preview page for the DispForm? Thanks.

    Posted 3 weeks ago #
  4. Do you have MOSS or SPD?

    Posted 3 weeks ago #
  5. Paul - It looks as if you are getting ideas for the next Superstar session. Good stuff. -- Mark

    Posted 3 weeks ago #
  6. eric
    Moderator

    We've got a web part called Site Workspace Viewer. It maybe possible to recode it to look at libraries instead of workspaces, not sure as my coding skills are pretty weak. I'd have to find where it came from as it was third party web part.

    eric

    Posted 3 weeks ago #
  7. If it works like the viewlsts page, it's all server-side code. I also couldn't find a web service that yields list/library directory.

    If you have MOSS, we can start with the CQWP for a workaround. If not, we may need SPD to use a DVWP or a workflow that populates data/creates objects. Do you have either?

    Posted 3 weeks ago #
  8. hrussell
    Member

    I've got MOSS (Standard) and SPD. Am happy to try anything!

    Posted 3 weeks ago #
  9. hrussell,

    One option for the workaround:
    Create a content type called "Library Description" or something like that. Put the fields you'll need like Title and Description. Add that to all libraries where you want them to "bubble up."

    In the libraries, place a new document with your description content type and the appropriate data. We can then use a CQWP to collect all library description documents from around the site collection in one place.

    This is more manual work, but you can make the content type and the default description document part of a library template to help things along. Links to the document will lead to the library it's describing.

    OR

    another method (less manual labor, more up-front code):

    Get that OOB page, copy the relevant code into a new SPD page and hack away at it until it can itinerate over your sites and spit out all of the libraries.

    Posted 3 weeks ago #
  10. There's a Web Service called GetListCollection that returns the list of all lists for a site. I haven't used it myself.

    Posted 3 weeks ago #
  11. I've been looking for that one and couldn't find it. I'll check into it, thanks.

    Posted 3 weeks ago #
  12. As long as all of the libraries are in the same site, the web service will work. Otherwise, you have to run the service for every site/subsite.

    here's what you need for SPD.

    http(s)://<server_name>/_vti_bin/Lists.asmx?WSDL

    Select
    ListsSOAP
    GetListCollection

    I created that connection on my site. Then I opened a new page and added a DVWP. I selected the list style with no paging (all items) and picked a filter based on BaseType=1.

    When I got my list, I added the following code around the title to get the links working:

    <a href="{@DefaultViewUrl}">
    				<xsl:value-of select="@Title" />
    			</a>
    Posted 3 weeks ago #
  13. This was easier than I thought with the web service. I'll try to post the whole thing this weekend--plug and play!

    ...
    edit:
    http://www.endusersharepoint.com/?p=1304

    Posted 3 weeks ago #
  14. hrussell
    Member

    Wow, this is great. Thanks!

    Posted 1 week ago #
  15. eric
    Moderator

    This is nice. One tweak I'd suggest is trying to make the URLs dynamic instead of hardcoded if possible. It could then be packaged as a web part to be used on other sites/site collections?

    Possible?

    (same comment left on the blog post)

    Posted 1 week ago #

RSS feed for this topic

Reply

You must log in to post.