Adding custom page metadata on existing modern sites?

Brass Contributor

We are using page metadata on newly created sites, however it does not seem to work with modern sites created prior to this functionality being released.
 
When I add columns they do not get added to the "Site Page" content type even though "Add to all content types" is set to Yes. It also appears the contact type is sealed so I cannot manually add the column to the content type.
 
Is this expected? Is there anyone else experiencing similar results? Any workarounds?

 

Thanks!

Tim

5 Replies

i am facing this exact problem on our classic team site .. i am unable to add custom properties to our modern pages .. and any custom column is not going to be added to the "Site Page" content type.

@john johnjust a heads up I posted the same info to the comments of the Structure your intranet page... post and it has more traction and discussion than this separate post. I would recommend using that post and/or reposting there since more people are looking at it. Basically others are seeing the same thing and we have not seen any official response yet.


@Tim Gagne wrote:

@john johnjust a heads up I posted the same info to the comments of the Structure your intranet page... post and it has more traction and discussion than this separate post. I would recommend using that post and/or reposting there since more people are looking at it. Basically others are seeing the same thing and we have not seen any official response yet.


@Tim GagneThanks for the info, will keep my eyes on this... But in my case i am working on a classic team site, and seems the "Site Page" content type is disabled only at the root site collection, and as a result we can not add custom columns to it.

But if i create a new site collection, also of type classic team site then i can add cusotm columns to the "Site Page" content type and hence to the modern pages...

We've seen this exact behavior on multiple site collections, including the root. I haven't seen any formal documentation from MSFT on this, but it would appear the Site Page content type is "special" in some way. Additionally, we've added columns in the Site Pages library and saw they were not indexed properly. 

 

The fix for all our issues on customizing the Site Pages was to create a custom content type inheriting from Site Page. If you're doing basic stuff with the new Page Properties model used in News and Highlighted Content web parts, this also works fine in that scenario. Oddly enough, while those custom columns don't show up in the search index, they worked fine when used as Page Properties. 

 

I choose not to complain to much because modern is so vastly superior an experience to classic :)

@Matthew MasonI also tried to create a new site content type which inherent from the built-in "Site Page" content type. and then i added the custom columns to the custom content type. after that i added the custom content type to the "Site Pages" library. but the problem i faced is that i were not able to force any new modern page to be created using the custom content type. as when users click on the "Add a Page" link, as follow:-

addapage.png

 

the built-in "Site Page" content type will still be used.. and i did not find a way to force any new modern page to use the custom content type by default?? any advice?