Documents Rollup
Display documents from SharePoint libraries with default list or card layouts, sorting, pagination, and view filtering.
Get Documents Rollup Working in 3 Steps
Prerequisites
- Bonzai 2 package installed on your site
- A document library with files
Add the web part
Edit your page and add "Bonzai Documents Rollup" from the Bonzai category.
Select a library
Choose your document library from the List picker in the property pane.
Configure display
Set template (Default or Card), sort order, and items per page, then publish.
When to Use This Web Part
Use this when you need to...
- Display recent documents on a page
- Show department-specific files
- Create a simple document gallery
- Highlight featured documents
Best page locations
- Homepage — recent documents widget
- Department pages — team documents
- Landing pages — featured file showcase
Consider alternatives when...
- • Full search experience — use Document Portal
- • Tabular data view — use Documents Table
Related web parts:
Common Configurations
Copy these ready-to-use configurations:
Recent Documents
Show recently modified documents
| title | Recent Documents |
| templateName | default |
| sortBy | modified |
| itemsPerPage | 10 |
| showPaging | On |
Document Cards Gallery
Card layout with thumbnails
| title | Department Files |
| templateName | card |
| itemsPerRow | 4 |
| itemsPerPage | 12 |
| showPaging | On |
Featured Documents
Show only promoted documents
| title | Featured Documents |
| showPromotedItems | On |
| templateName | card |
| itemsPerRow | 3 |
Compact Document List
Minimal list with link to library
| title | Documents |
| templateName | default |
| itemsPerPage | 5 |
| showMoreText | View all documents |
| showMoreUrl | /sites/docs/Documents |
Best Practices
Sort by Modified date
Use views for filtering
Card layout for visual content
Reference
Document Library Schema
Documents Rollup uses standard document library fields. No custom columns are required, but you can add a Promoted/Featured column to mark promoted documents.
- Select an existing document library with files.
- Optional: add a Featured (Yes/No) or PromotedState (Number) field for promoted filtering.
- If using promoted filtering, set the field value on documents you want to feature.
| Column | Type | Required | Notes |
|---|---|---|---|
| Title | Single line of text | Yes | Default library field |
| FileLeafRef | Single line of text | Yes | File name (built-in) |
| FileRef | Hyperlink | Yes | Server-relative path (built-in) |
| Modified | Date/Time | Yes | Used for sorting |
| Created | Date/Time | No | Fallback sort |
| Featured | Yes/No | No | Optional promoted filter (PromotedState also supported) |
| PromotedState | Number | No | Optional promoted filter (SharePoint system field) |
Property Pane Configuration
Title Settings
| Property | Type | Description |
|---|---|---|
title | Text | Web part title displayed above the content |
titleUrl | Text | Optional URL to make the title clickable |
titleIconOption | Dropdown | Title icon mode: Custom or None |
titleIconName | Icon Picker | Fluent UI icon picker (e.g., DocumentSet, Document) |
titleIconUrl | Text | Custom icon URL (overrides icon name) |
description | Text (Multiline) | Optional description below the title |
showMoreText | Text | Text for the "Show More" link in footer |
showMoreUrl | Text | URL for the "Show More" link (empty = hidden) |
Data Source Settings
| Property | Type | Description |
|---|---|---|
siteUrl | Text | Site URL where the library is located (empty = current site) |
listName | List Picker | Document library to display files from |
viewName | View Picker | View to filter documents (depends on selected library) |
sortBy | Dropdown | Sort by: Name, Modified Date, Created Date, or File Size |
showPromotedItems | Toggle | Show only promoted/featured documents |
Dynamic Filters (Category/Tags)
| Property | Type | Description |
|---|---|---|
enableCategoryFilter | Toggle | Enable category-based filtering for this web part |
categoryFilterLabel | Text | Custom label above the category dropdown (shown only when no pre-selection is made) |
categoryFilterColumn | Dropdown / Text | Select which library column to use for Category |
selectedCategories | Multi-select | Lock the web part to specific categories. Only documents matching these values are returned from the server. When set, the runtime Category dropdown is hidden from end users. |
enableTagFilter | Toggle | Enable tag-based filtering for this web part |
tagFilterColumn | Dropdown / Text | Select which library column to use for Tags |
selectedTags | Multi-select | Lock the web part to specific tags. Only documents matching these values are returned from the server. When set, the runtime Tag dropdown is hidden from end users. |
Display Settings
| Property | Type | Description |
|---|---|---|
templateName | Dropdown | Display template: Default (list) or Card |
itemsPerRow | Dropdown | Items per row in Card view (2-6), only for Card template |
itemsPerPage | Slider (5-50) | Number of documents to display per page |
showPaging | Toggle | Show pagination controls |
visibleMetadataFields | Multi-select | Choose which metadata to show per document (e.g., Author, Modified Date, Created Date, File Size, File Type). Uncheck all to show file names only. |
fixedHeight | Slider (0-800) | Fixed height in pixels (0 = auto height) |
chromeType | Dropdown | Chrome type: None, Title Only, Border Only, Title and Border |
enableContentTargeting | Toggle | Filter content by user profile attributes |
Features Checklist
- ✅ List and Card display templates
- ✅ View-based filtering
- ✅ Multiple sort options (Name, Modified, Created, Size)
- ✅ Pagination support
- ✅ Promoted/featured items support
- ✅ Dynamic category/tag filters with server-side pre-filtering and runtime user dropdowns
- ✅ Configurable metadata fields
- ✅ Content targeting
- ✅ Configurable items per row (Card view)
- ✅ Custom title with icon and link
- ✅ Show more link