2

I have an XsltListViewWebPart on a custom page that works fine for a SharePoint 2010 library. My problem is that I need to tell this web part to list only documents in a subFolder of the library. How is this done?

0

First, you have to set the scope of you View element.

FilesOnly will get you only the files within the selected folder. Default will get you the files of the selected folder and the subfolders.

Then to specify the folder, add a parameter in SelectParameters for the XsltListViewWebPart element.

<SelectParameters>
    <asp:Parameter Name="RootFolder" defaultValue="Documents/FolderName"/>
</SelectParameters>

https://msdn.microsoft.com/EN-US/library/office/microsoft.sharepoint.client.viewscope.aspx

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.