Creating hyperlinks to missing pages in modern SharePoint

If you ever used the classic Wiki pages in SharePoint, there was a really cool feature that allowed users to link to pages that did not exist yet. In SharePoint Wikis, you could link to another page on your site using the double bracket syntax. Example:

Please go to the [[Announcements]] page.

SharePoint would handle this by connecting the the Announcements page to the text within the brackets. The really cool thing about this is if a user clicked on a link to a page that didn’t exist it yet, SharePoint would ask them to create a new page! This is similar to how Wikipedia creates empty hyperlinks to pages that still need to be created.

A question came up in a SharePoint sub-reddit asking whether this works in Modern SharePoint. The answer is YES!

Back to basics

To see this feature in action, create a new page in your SharePoint site and add a text webpart to the page.

Let’s say at the end of this text, we would like to add a link to an existing page within this site. All we have to do is start typing “[[” and SharePoint will return all the pages we can link to.

 

If we wanted to link to the Singapore trip report page, we could then just click that page from the dropdown, and it will become a direct link to that page. Pretty cool right!?

Creating a new page from a link

Now that we have seen how using the “[[” allows users to link to existing pages, lets see how Microsoft brought forward the classic Wiki linking functionality to allow users to create hyperlinks to pages that do not exist yet.

To do so, start by typing “[[“, but ignore the dropdown values for existing pages. Continue typing in the title for a new page and close it with two double brackets “]]”. Make sure you press space key or click away from the “]]” or else the resulting link will be a 404.

Once this happens, SharePoint will automatically create a hyperlink for us.

If you look closely at the link, you’ll notice that the URL points to a new page (doesn’t exist), and it passes along the ?wikiTitle=Communication query string.

The wikiTitle query string parameter notifies SharePoint to not throw a 404 error, but instead initiate the new modern page creation flow. When a user clicks on this link, SharePoint will popup the page template selection screen!

Once a user selects a template, they will be brought to the new Communication page to continue editing and finish creating the page.

This page has also now been linked correctly to our previous page!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s