Filtering SharePoint News Pages with Metadata

This is a quick tip about a SNAFU which caught me up today. I got to do a “Doh!” in front of a client, which is always fun. Hopefully this will save you the same embarrassment.

Home Simpson saying "Doh!"

Filtering News pages based on some metadata applied to the pages is a thing, and has been for a good, long time. I knew it should work, and pretty easily at that.

When I was on the call, I had added a metadata column to the Site Pages library. Simple. I went and put the page with the News Web Part into edit mode and looked in the Filter section for Page properties. No joy. Instead I was seeing:

Managed Properties are awesome, and I set them up all the time so I can build search-driven solutions, usually with the PnP Modern Search Web Parts, which, as I’ve said before, are the bees knees. But I knew there should be an option to filter based on Page properties instead. Had something changed? Was it better? I wasn’t sure.

I fired up my MVP communication channel and asked if things had indeed changed. As I expected, Susan Hanley (@susanhanley) responded almost right away.

Look to see what the Source is for News. When it is a single site (i.e., the site you are on), you can filter using Page properties. When you are selecting news from multiple sites, you will not see the Page Properties option – just Managed property.

Doh! I hadn’t even though to check that setting! A simple change at the top of the News Web Part properties to use This site as the source, and Page properties was back where I expected it.

This makes sense if you think about it. The Page properties in Site Pages libraries probably wouldn’t be consistent across multiple sites, so Managed properties makes more sense. Within one site, the Site Pages library is a single source, so has to be consistent with itself.

I do think there could be some in-Web-Part assistance for this with a slightly better UI, though. Maybe just an info bubble like the Enable audience targeting section right below it?


As you might expect, Greg Zelfond (@gregoryzelfond) has a great post about all this if you want to understand it better:

How to manage categories of news using custom metadata – SharePoint Maven

Similar Posts

6 Comments

  1. Hi Marc,
    I’m trying to use the Managed property where ContentType = Repost Page but no matter what I enter in the ‘Enter search value’ the webpart does not limit the content shown. How do I use the Managed property ContentType for limiting news?

  2. I’m still shocked that the Page Properties web part (which displays the property tags you’ve added to a given news/page item, doesn’t actually do anything. Meaning, you see the tags for that news item, but it looks and behaves like a button, but doesn’t actually launch anything. I was expecting it to perhaps take me to a built-in all news pages, dynamically filtered on the tag property I clicked on. Nope.

    In fact, there doesn’t seem to be a way to create that experience at all. Do you know of way to accomplish that?

      1. Thanks for the response.

        I thought about a custom SPFx webpart too, but the second problem I ran into is that there doesn’t appear to be any support for the existing news or highlighted content webparts to support displaying content filtered by URL parameter. That would be key to building the dynamic behavior of showing news article results by page property. Perhaps the PNP search results web part would support that–not sure.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.