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

10 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

Leave a Reply

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