Trying to add a category column in Site Pages from a list when creating pages in Sharepoint

Copper Contributor

I added a 'Category' column to the 'Site Pages' list. I want the choices for this column to be populated by a list on the same site. I used a lookup column and it works well, but it cannot be used in a news web part. This is a problem because I want to show the news by category.

 

To solve this, I tried using Power Automate to update another column, but it does not trigger on create (since pages are created before assigning a category) and modified is not always triggered. Additionally, the 'modified' field is not always set to true on the 'Category' column, likely because it is behaving poorly due to the lookup function.

 

So, my question is, how can I populate the 'Category' column from another list in 'Site Pages' and make it usable in web parts for filtering?

1 Reply

Hello @yanni99 

 

i recommend you a solution without lookup columns.

 

Or what's your use case to use lookup for a category in news?

 

I prefer to use choice or managed metadata columns in site pages, after that, you can use this columns as page properties for filtering in news web parts. It's easy and included ootb.

But you can't edit the layout of the news web parts.

 

For customizing the news, you can use PnP Modern Search Web Parts, but you need to customizing your layout. https://microsoft-search.github.io/pnp-modern-search/ 

 

Best, Dave