Link to home
Start Free TrialLog in
Avatar of Dan Carp
Dan Carp

asked on

Sharepoint Online - Set Document Library Home Folder

I'm new to Sharepoint (online) design.  I've got a library of documents uploaded to my site and a set of pages that roughly correspond to subfolders of these files.  On each of these pages, I would like to include the "Document Library" web part and have it point by default to the subfolder that it corresponds to.  I would also prefer to not upload each of these subfolders as their own document libraries.  Is it possible to set the starting folder for the document library web part, either within the page itself or within a document library view?  If so, how?

Thanks!
Avatar of Walter Curtis
Walter Curtis
Flag of United States of America image

You can create views that use the name column as a filter and where the value of the filter would be like this:

Show items only when the following is true:
Name
is equal to
Folder Name

Then on your pages add the web part but using the web part properties, set the display to show the view that corresponds with the page.

Hope that helps...
Avatar of Dan Carp
Dan Carp

ASKER

Thanks Walter - I just tried that and all I see is the folder name as the only result.  When I click on the folder, I get no documents.  See attached images...

User generated imageUser generated imageUser generated image
You are correct, because the filter remains in place when you drill down. Sorry about the incorrect tip. Haven't had coffee yet this morning.

I am sure you know how to grab the url to get to a folder. That may be a way to get to the results you want. Grab the url of the folder, then add a page view web part (which is an iframe) to the corresponding page that uses the url of the folder to display the folder on the page. You may receive a message saying the use of iframes is blocked in your farm for security reasons. You would have to work with security to get that modified, but it might work for you.

Hope that helps...
Thanks again Walter, and no worries.  I haven't had much luck getting the folder to embed properly, but have found a stopgap.

https://www.tombenjamin.ca/blog/designer/view/using-caml-query-show-files-folder/

This method allows me to filter by folder contents, but with it I am unable to use the "Show in folders" view.  I'd still love a method to have the document library open to a specified folder with folder view.
Glad you got it working...
To clarify, the link I posted gets me only so far.  Does anybody have a solution for showing documents in folder view, with a subfolder as the starting view?  Thanks!
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.