Forum Discussion
Using custom properties in Modern Site pages
Hi Ryan,
Thanks for your reply. My problem is actually before you even get to looking at the Highlighted Content webpart - as I couldn't enter any data to the columns I added, I never bothered looking at the webpart.
Having now looked, the columns that I've added aren't showing in the webpart's list of possible properties to filter by either. I can't help but think it's got to be because the columns I'm adding aren't being associated with the Site Page content type, but I am following the instructions exactly.
Sam
Did you ever get this resolved? I'm having the same issue on my tenant.
It's a classic site collection using the modern UI. I added a bunch of columns to all content types in the pages library and they don't show anywhere on the front end, not in the properties pane, not in the page details area, not in the page properties web part :(.
- Sam ChurchillNov 27, 2018Copper Contributor
Hi Rebecca,
Yes, I did, after lots of painful sessions on the phone with MS showing the problem again and again.
It turned out that the Site Page content type was "sealed" so no additional properties were being added to that type. You can unseal it using the script at https://gallery.technet.microsoft.com/Unseal-sealed-content-654ac401 then you'll have to recreate all of your additional properties (or get them applied to the Site Page content type).
Be aware that, if you add a "yes/no" column it can't be used for filtering in the highlighted content webpart. Apparently this is "by design", but it seems a very strange design to me, so I've added it to UserVoice at https://sharepoint.uservoice.com/forums/329214-sites-and-collaboration/suggestions/36117193-allow-yes-no-columns-to-be-used-for-filtering-si.
Sam
- Rebecca GordonFeb 10, 2019Copper Contributor
Thanks Sam! I'll give this a go :D
- Rebecca GordonMar 11, 2019Copper Contributor
I altered the script to make it tidier and also so it just runs against the Site Page content type, not all content types. See here for script: http://bexgordon.com/2019/03/cant-add-properties-to-modern-sharepoint-pages/
I still can't get it to show all properties on the actual Page properties webpart on the page - it seems to only show single line text fields? I also tried multiline and yes/no. It does let me set these fields in the page libraries information panel though, whereas before I couldn't see them.
Did you get all of your properties to show on the Page properties webpart Sam?
- RobinOrgHoodJan 18, 2019Copper Contributor
Sam,
Knowing how to unseal the SitePages content type was quite helpful. Thanks for sharing! Prior to that the Page Properties simply was not useful.
Alas, what some of us is looking for is a way to surface the site pages lib default metadata, like created, created by, modified, and modified by. Even tried calculated columns and lookups to the root [created] etc and no joy.
I mention it here in case Microsoft is reading this. Seems in my research that *many* people have been wanting this function for years. If page properties gets any engineering focus, this would be nice to have!