Tagging Modern Pages in SharePoint Online

Reading Time: 5 minutes

The recent announcement  from Microsoft surrounding the ability to tag SharePoint Online modern pages with page metadata is great news. Today it was delivered to my tenant, and I couldn’t wait to dig in and try it out. I did, so here we are!

The ability to tag modern pages was already possible by adding a custom property to a content type inheriting from Site Page. However, this was not an easy thing to setup nor configure from an end-user perspective. In addition, you couldn’t view the property on the page’s content. This new modern page tagging capability addresses each one of these limitations!

This post will demonstrate how to tag modern pages and display them to an end-user based on that tag. My simple example will be tagging pages with one of 3 colors (Blue, Green, or Orange) and displaying them to the end-user categorized by color. I’m using this example to visually demonstrate the power of tagging.

Although this may not be a real-world example, the techniques used to build this are the same ones you would use to tag pages based on location, business function, target audience, etc.

Note: Throughout this post, I use the words tag and property interchangeably.


Add the Page Property (tag)

PagePropertyDefinition

 

A page property manifests itself as a column on a Site Page. To demonstrate this, I’ll start by adding a new column called Category to the Site Pages library by clicking Add column on the row heading. For this example, I select a Choice column type and provide the definition shown in the image. My choice values are Blue, Green, and Orange.

Read my observations at the end where I talk about this feature also giving us the ability to add properties to multiple Site Page content types. Although the technique to add columns to multiple content types in a library is slightly different than what I’m showing here, having this ability provides even more flexibility and power.

 


Add the Page Property to a Page

Now that I’ve added the column (property) to the Site Pages library, I can tag all new site pages I want with a value for that page property.

To tag a page, click the Page details link on the top ribbon while editing it. This opens up the page’s property panel where the property you’ve added to the Site Pages library, Category in this case, can be set. In these 2 images, I’m setting the Category property on a page to Blue:

Using the technique above, I’ve created a new page, added a blue header and some content and set the Category property to Blue. I also decided to show the value Blue on the page by adding a new web part called Page Property. When you add it, click the Add properties button and add the property on the right-hand side pop-out panel. For this example, I select the Category page property since that’s the one I want to display.

This slideshow requires JavaScript.

Here is what the page looks like with the Page Property web part displayed on it (circled).

PagePropertyonPage
Site page with Page Property web part

Create All Tagged Pages

Once you have a page set up, you can save time by creating a copy of it for a new page. This is what I did to create 2 more pages. This copies not only the page contents but ALSO the page property, which in this case is the Category of Blue. I then updated the content and picture on each page and published them giving me 3 pages all tagged with the Category of Blue!

Copyofthispage

I repeated the same for the Green and Orange categories.


Create a Summary page for each Category property

To demonstrate the power of page properties, I want to display links to all Blue pages on one summary page. To do this, I created a new site page titled Show me all the Blue Pages and added a Highlighted Content web part on it.

ShowMeAllTheBluePages.jpg
Summary page with Highlighted Content web part (search-based)

HighlightedContentWebPartPickBlueConfigure the properties of the Highlighted Content web part on the property panel that pops open on the right-hand side of the screen. Set the Source to ‘The page library on this site’ and the Type to either ‘Pages’ or ‘News’. In this example, I select ‘Pages’ since that is what my 3 Blue pages are. Once you do this, you will have the option to select Page properties as the filter.

For my filter, I select the page property, Categoryfrom the dropdown and Blue as the filter value.

It’s that simple.

I did the same for the Green and Orange summary pages, adding a Highlighted content web part to each of them filtering on Green and Orange respectively.

Note: You can also add page properties to News pages! This is a great use-case for publishing news items for different categories across your organization and for rolling up in a SharePoint Hub.


The End Result

The Highlighted Content web part usually relies on search to show results however the Page Property filtering appears to work instantly making it behave more like a library filter rather than being reliant on the search crawler. Once the filter has been applied, the page thumbnails appear on each of the color Category summary pages for the Blue, Green, and Orange tagged pages previously added. Scroll thru this slideshow to see the 3 summary pages:

This slideshow requires JavaScript.

Cool.


Organize your pages!

In the Site Pages library, now that a custom column has been added to your pages, you can organize them by creating views and grouping by it. For this example, I’ve grouped by Category so I can see all of my Blue, Green, and Orange pages together.

SitePagesLibraryView
Site Page library grouped view

My Observations

Three key observations I’ve made with this new feature:

  1. The user interface is intuitive and simple-to-use, a must-have for adoption at scale.
  2. This applies to both News pages and site pages making this a very flexible tagging mechanism for building out dynamic sites.
  3. You can have multiple custom content types (inheriting from the Site Page content type) in the Site Pages library and they will each show the correct page properties in the property panel when editing the page. This is something I’ll be working with further and adding to my Setup Targeted Training on Office 365 Adoption Center post I’ve previously blogged about.

The possibilities this new feature brings to modern publishing in SharePoint is fantastic, providing a lot of flexibility for organizations to leverage in many different ways. I can’t wait to start building out some really cool solutions with this and seeing what many of you build too. 🙂

Thanks for reading.

-JCK

22 comments

  1. Hi Joanne,

    Thanks for that interesting article. I followed exactly your instructions but the “category” column does not appear into the property name section of the Highlighted content web part. Category is correctly added into the content type, pages are tagged with some values. Any idea?

    Regards,
    Roch

    1. Hi Roch,
      Are you adding the Highlighted Content web part on the same site as you added the pages? If not, you have to use a different technique and leverage the search managed property instead. I blog about that technique in another post of mine titled “Building a Modern Company Locations page in minutes”. For that, you can’t use the “The page library on this site” as a source in the Highlighted Content web part. Hope that helps.
      -JCK

  2. Hi Joanne,

    Thanks for the article… pretty nice! I have a problem with the News WP that let you do also a “Page property” filtering in the same site. The problem that I have is that in edit with 2 News WP in the site, everything seems to be well. When I publish the page load and everything is good but when I refresh, if I have more than one New WP on the page the filtering of the 2+ WP don’t work. I have tested with the Content Highlight and it work but not with the News WP.

    Did you notice that ? It seems like a MS bug.

    For now going with the Content Highlight is not really an option since we like the rendering of the news layout.

    Thanks

    1. Hi Jeff,
      I just tried the same thing and I also experience the same “bug” with the News WP. It filters correctly when in ‘Edit’ mode, but as soon as the page is published, the filtering only sticks for one of the web parts. I would log it to Microsoft.
      -JCK

      1. Great tutorial, Joanne.

        I tried with New WP same as Jeff before reading comments, and even tried creating two separate Page Properties columns so it filtered searching for different attributes, but encountered the same issue!

        The only workaround I found was including a keyword in the title and then filter by title search words.

        Mitch

      2. Hi Mitch,
        Couldn’t you also use the highlighted content web part instead? That works with multiple instances on a page with no issue.
        -JCK

  3. Hi Joanne,
    This does work well for highlighted content on a site, however, I am seeking to roll-up news content to a hub site. The only instance to filter by Page Property is when the selected source is ‘The page library on this site’, which wouldn’t include news from other sites in the hub.

    It’s ok, because with News WP we really like the HUB News layout, it displays content in a nice format not using too much page real estate, whereas highlighted content is a larger image, greater spacing between articles and adds publisher profile photo.

    The other feature I’m not a fan of with highlight content for news articles is the SharePoint page icon overlay on every image. This is great for differentiation between file/page types with mixed content but not if all content is same type. An appearance toggle for this would be nice.

    Mitch

  4. Hi Joanne – Great post, thanks for putting this together.

    What are your thoughts about addressing this same need for Documents? We have a lot of documents that we want to reuse across multiple pages and that get updated regularly so we want them to update across pages by just applying the appropriate properties. The capability for documents is far more limited than it is for pages. Do you have some suggestions?

    1. Hi Brent, I guess it depends how you’re planning on “reusing” the documents across pages? Do you mean you’re embedding the document on a bunch of pages? Or… are you adding a highlighted content web part on the page and filtering documents to show? Documents have a lot of metadata capabilities as well, but I would need to understand your particular use-case to be able to recommend a solution.
      -JCK

  5. Yes, excellent article and the best introduction to this feature.
    I am trying to use the filtering feature for Date columns, with no luck yet. Seems like a reasonable place to add an Expiration Date property, and then filter based on the date within the webpart. So far, no luck. It doesn’t seem to support the [Today] filter e.g. Expiration Date > After > [Today] Will keep trying. I have multiple client requests for Expiration date filtering on News. Looks like it may be a Flow thing for now.

    1. Hi Michael, I’ll spend some time on this, I haven’t tried yet but can definitely see the use-case for it. Thanks!
      -JCK

      1. I worked on this a bit more, and unless I am missing something, there just isn’t any support yet for date filters. I’d have to imagine this is in the works. However – I added an Expiration Date Property AND a Page Status Property. Then, added a very simple Flow to run each morning and change the Page Status to Expired for any page past the Expiration Date. Lastly, I filter my News on Page Status NEQ “Expired”. Works great! (In theory – There are a number of bugs with Page Properties still. When you add additional Properties, they never show up in the News filter. Frustrating, but as always, fun to be on the bleeding edge and figuring this stuff out.) Thank you for all you do for the community!

      2. Hello – I discovered you can filter on dates. I’ve written a blog post on a couple of ways to do it. Please give it a read and let me know what you think and if it’s what you were trying to do. Either way, I think it’s something that will be applicable to several scenarios I’ve come across too! I hope you find it helpful. 🙂
        -JCK

  6. Hello Joanne, the feature “details page” on modern page is not available for readers on a Modern Sharepoint site. Is there a solution to this issue ?

    1. Hi Lulug,
      That feature is available to update the page properties so it doesn’t make sense for a reader to see it. If you want a reader to see the page properties, add the modern web part, Page properties, to the page instead to show them. I’ve done this many times on pages I build that have custom metadata.
      -JCK

  7. Hi Joanne, Stumbled across this post yesterday and implemented it successfully if I only tag the page with 1 value. If I choose multiple values the Highlighted content wp doesn’t seem to be finding it.

    for example, news pages with different meals being tagged as Breakfast and Lunch. Some meals will fall into both tags.

    On the highlighted content wp I find the managed property, I select ‘contains’ and I type ‘Lunch’. Nothing appears.

    1. Hi Alec… hard to troubleshoot over this chat however I do what you describe all the time and it definitely works (which is what I think is the benefit of tagging multiple values). Make sure pages are published and crawled.
      Joanne

  8. Hi Joanne, great article! We have implemented this to group pages with the same topic. Do you know if there is a way (other than filter out on title) that make us not show the current page?
    For example I have a topic that is blue, and on all the pages tagged with blue we have highlighted content showing pages tagged with blue but I dont want the current page showing up since that is confusing for users who will click it and just return to the same page again.

  9. Unfortunately neither the Page Properties web part nor the HCWB allow using a lookup column. We have an existing wiki using modern pages that have 100+ keywords assigned from a lookup list. Much easier for users to maintain terms in a list than editing the column in list settings.

    1. Another option… how about changing it to use a managed term set (at either site collection or tenant level)? They also work for filtering and can be maintained by an admin user.

Leave a Reply to MichaelD Cancel reply

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