Tagging Modern Pages in SharePoint Online

Blog post: 4 minute read.

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

Leave a Reply

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