Dynamically filter content based on page property

Copper Contributor


Is it possible to aggregate pages using a modern highlight content webpart an filter on managed metadata field to show child items? Filter should work dynamically based on page taxonomy field value. Like you could with classic page layout and PageFieldValue filter.


More detailed question

With classic webparts I was able to add a Content Query Webpart with a filter that would rollup other items (document, links, pages, etc.) that had the same metadata property as the current page, including the option to filter on managed metadata child items. See attached screenshot.




This provided the opportunity to create a wiki template with custom properties, add a CQWP to the page layout, and rollup items by default on the same property. The end-user only had to create pages and specific the property of the wiki page, and voila: additional content appeared automatically.


I would like to provide the same functionality with modern webparts. I can add custom (managed) metadata to modern pages. I can add a Highlight Content Query webpart to a template page, and filter on a property and specify the filter query manually. But it seems this cannot be accomplished dynamically. I don't want my end-user to edit webpart properties en fiddle around with queries etc. Why should they, they should only update the page properties and webparts should apply the filters based on the page properties. Preferably also respecting managed metadata field with multiple layers and be able to show child items. 


Can this be done with out-of-the-box SharePoint Online and modern pages? Or is there an item on the roadmap that would make this possible. Any tips are welcome. 

2 Replies

@Bastiaan Kortenbout curious if you found a way to achieve this result? I'm attempting, despite all of SharePoint's roadblocks, to build a knowledge base wiki and dynamically displaying documents and list data from several sources base on a page property would be INCREDIBLY useful. It's exactly what I need. 


I find myself constantly disappointed to spend hours researching and struggling to implement solutions out of the box that I could build in Notion in 5 minutes... 



Yes sir. Quick reply, because I am busy.


This is the Query I used.

{?{|owstaxIdWerkpakket:{Page.NavolgendWerkpakket.TermId}}} Path:{Site.absoluteUrl}/SitePages


Check out this blog.

Tech and me: S15E03 Query Variables – Constant Trouble (techmikael.com)