The following is one way to display the folder from a SharePoint library as a web part. While there are other approaches, the goal of the following approach to create this folder display with no code, no custom web parts, no access to the servers and no custom XML or HTML. This approach uses SharePoint Designer to create a new page with a single web part to display the folder. The challenge is not the web part, but displaying just a single folder out of the list. Once the new page has been created you can navigate to the folder and the copy the URL for this page and then use it to display the page in a Page Viewer web part. It of course would be ideal if the library's web part properties included a way to filter by URL or folder.
Create a View
- Go to your document library (Example: Shared Documents)
- Click Settings menu and select Create View
- Click Standard View
- Give the view a name (Example: Folder View)
- Pick the columns to display - Type (icon linked to document) - Name (linked to document with edit menu)
- Limit the number of items displayed by expanding "Item Limit" (Example: 10)
- Click OK to create the view
Add a web part so we can have something to copy to our new page - Click Site Actions and Edit Page
- Click Add a Web Part
- Add the web part for your library (Example: Shared Documents)
- From the web part's Edit menu select Modify Shared Web Part
- Make these changes:
- Select your newly created view
- Change the Toolbar Type to None (unless you want the tool bar displayed - for exmple, to allow uploads)
- Expand Appearance and
- change Chrome Type to None
- Click OK
Create the page to display the list - Open SharePoint Designer and open your site
- Scroll down and double-click default.aspx to open your home page - make sure you are displaying the page in Design view (tabs at the bottom of the edit screen)
- Click the web part that's displaying your new view, right-click and select Copy
- Click File, New and select ASPX page
- Rename the page to a useful name such as SharedDocumentsFolderView.aspx
- Double-click the new page to open it in the editor - make sure you are displaying the page in Design view (tabs at the bottom of the edit screen)
- Click in the form box and then right-click and select Paste
- Click File, Save (you can close SharePoint Designer now)
Get the URL to the folder - Open a new browser and navigation to the new page. Probably something like: http://moss.litwareinc.com/sites/testsite/SharedDocumentsFolderView.aspx
- Click on the folder you want displayed. The URL will now look something like:
http://moss.litwareinc.com/sites/testsite/SharedDocumentsFolderView.aspx?RootFolder=%2fsites%2ftest%2fShared%20Documents%2fsub1 &FolderCTID=&View=%7bE0AECBEA%2d20BB%2d4BC3%2d98BC%2dE65D4ADB9DB1%7d - Copy this URL
Add the web part to your home page - Return to a browser and display your web site's home page
- Click Site Actions and Edit Page
- Delete the web part you added earlier for your library
- Click Add a Web Part
- Add the Page Viewer web part
- From this web part click Edit Shared Web Part
- Paste the URL to your new custom page in the Link box
- Change any other properties needed. Most likely are:
- Appearance -> Title Appearance -> Chrome Type
- Appearance -> Height Appearance -> Width
- Advanced -> Title Url (most likely a link to the full library)
- Advanced -> Description
- Click OK