Forum Discussion
How to sort Highlighted Content by Date Created
- Jan 28, 2023
Hi Anthony-123
"Going to my document library and creating a new view that sorts by active column results in zero items. This is why I'm using the Highlighted Content web part. If the document library view were able to show all documents regardless of number of nested folders, this would be ideal."
If you want to display all files in a view of a documentlibrary regardless of folders, you need to edit the View
And scroll down to and expand "Folders" and check "Show all items without folders"
This results in a view that displays all files in the document library regardless of folders.
You can still sort and filter that view to your liking.
Best Regards,
Sven
Hi Anthony-123 ,
If you use the source "This site collection" or "This site" or "All Sites" or "Select Sites", then try to sort your data by the managed property "Created" descending
If you select the source "A document library on this site", then sorting by the "Created" date does not seem to work with the "Highlighted Content Webpart".
But in that case you can simply use the "Document Library webpart".
- Go to your document library and create a new view that is filtered to your active column and sorted by the "Created" Date descending.
- Switch that view to "Tile" mode and save it as "New Documents" or something like that.
- Then go back to your page with the "Highlighted Content Webpart" and remove that webpart from your page.
- Insert the "Document Library Webpart" and select your document library and your new view.
- Deselect "Show command bar" and "Show See all button"
If you don't like the "Tile" view, you can customize it.
This would too much for this post, but take a look at i.e. this sample https://github.com/pnp/List-Formatting/tree/master/view-samples/document-library-gallery-card
Best Regards,
Sven
The issue is that I only want to show a list of documents in a specific document library. Setting the Source as "A Document Library On This Site" does not present the option to Sort by Created. Yes, if I change the source I can see this option to sort but then I'm seeing documents from the entire site, not the specific document library. Seems like a bug to me. Technically, I could probably add a column to this library to use the filter function but I'm not going to do that extra work to fix a Microsoft bug.
Going to my document library and creating a new view that sorts by active column results in zero items. This is why I'm using the Highlighted Content web part. If the document library view were able to show all documents regardless of number of nested folders, this would be ideal.
The objective is to show all the documents in a document library in descending order by date created regardless of how many folder / levels deep the document may exist.
- SvenSieverdingJan 28, 2023Bronze Contributor
Hi Anthony-123
"Going to my document library and creating a new view that sorts by active column results in zero items. This is why I'm using the Highlighted Content web part. If the document library view were able to show all documents regardless of number of nested folders, this would be ideal."
If you want to display all files in a view of a documentlibrary regardless of folders, you need to edit the View
And scroll down to and expand "Folders" and check "Show all items without folders"
This results in a view that displays all files in the document library regardless of folders.
You can still sort and filter that view to your liking.
Best Regards,
Sven- Anthony-123Jan 28, 2023Iron ContributorThat'll do it! I didn't know about that Folder option in the view. Thanks so much!