News Web Part - filter by Managed Metadata

Silver Contributor

I have added a Managed Metadata (with allow multiple choices enabled) column to the Site Pages library. When I use the News web part and choose the Page Properties filter, i can set it "Equal" to a value, but I can't use Contains or any other filter type. This prevents us from displaying a news article that has more than one attribute selected in the Managed Metadata column.

Is this is a known limitation or a bug?

13 Replies

Hi @Dean Gross 

I have exactly the same issue. 

 

As a news manager/page owner I need to be able to add multiple items as filters specifying X and Y as well as X or Y categories. So that I can show the news I want on my page.

 

It took me a while to figure out that to see if my filter had worked I had to click the "Apply" button (different functionality to other modern webpart filter settings).

 

 

Dorje

Hi Dean,

 

Did you find a solution to this? I'm having the same problem. I have a custom column in the pages library but unable to filter by it in the News web part. I selected 'page properties' in the filter but my custom column doesn't show. I only have 'Title'.

 

Thanks

Hi @Aragorn 

I just checked my modern sharepoint intranet home page, news carosel.

In the webpart filter, the only drop down options I have are a "blank" drop down item and "title" item, then the equals,contains etc drop down

I thought that the news filter used to have a "managed property" drop down option along with the "title" option. But I may be mistaken. When I checked just now only the "Highlighted content" web part had the "managed property" filter option.

Perhaps you could use "Highlighted" content Paul ?

 

@Dorje McKinnon Thanks! I found the answer to my problem. I was using a Boolean (Yes/No) column for my news pages library and it looks like this is not a supported data type for the News web part filter. I changed to Choice and it now shows in the drop-down.:smile:

 

Supported column types:

  • Single line of text
  • Multiple line of text
  • Choice (Multi Choice)
  • Number
  • Currency
  • Lookup
  • Hyperlink or Picture
  • Calculated
  • Computed
  • Managed Metadata
  • Approval Status

https://vitextra.com/en/support/kb/10031

I did add a new column name "category" with "Choice" Type but I did not see it from the dropdown of Managed Property. How do you able to show the category property from the Managed property dropdown?
Thank you.

Hi @Vincent_Nguyen 

I'm not very sure how to answer your question but I think, there may be a difference between the Library Columns and the ContentType columns.

The library has the Category column , but the ContentType for your files doesn't know about that column so you'll need to alter the ContentType to show the new column in your library.

I'd suggest you do some reading before just changing things. Generally you don't want to change the "Site Page" content type, but make a Child content type e.g. VincentsSitePage with the "Site Page" as it's parent.

Then add your Category column to VicentsSitePage, then change all your pages over to VicentsSitePage content type, and make it the default for the library.

Then when you view the properties of a page it will show the columns related to it's content type (which is now VincentsSitePage) , which contains Category.
Sorry this is getting into more advanced SharePoint admin tasks. 

@Dorje McKinnon 

The Managed Property only appears in the drop down (inside the news web part) if you choose "select sites" under "select a news source". !

If you choose "this site" then the managed property is not available! strange...

hi @JuanBij12 . I see the same functionality.
Under "News source", select "This site", then under "Filter" the drop down contains "Page Properties" and for me the only property I can select is Title.
I'm sure if I altered the SitePages content type to contain all the metadata columns I might need then they would show up in this drop down.
I use regular choice columns in my site pages library and they work fine. Then I filter the news web part on a choice value and it's fine.
When I add Two filters like Managed Property
1st filter - News type = Main News
2nd filter - IsActive = Yes
It filters with OR not AND. How can I get AND condition?
Thanks.

@nipW Not the most elegant solution but you could create a calculated column that fuses 'News type' and 'IsActive' together, and then filter on the calculated column e.g. MainNewsYes 

@Dorje McKinnon I've just spent days trying to fix this problem on our sites. some only show Title, some show all the custom columns available. After re-creating the columns in all sorts of different ways I then changed the default content type on the library for the offending sites to our custom type and all the columns appeared in the web part. For us, the standard Site Page type doesn't have any custom columns added to it, they are only added to our custom subtypes.

Many thanks @AndyClarke 

In our tenant, most of the news pages are the default "Site Page" content type, but some of them are our own customer content type. At present all work correctly , who knows. :cryingwithlaughter: