In this tutorial, you will learn how to get access to the page Url for a content object within Sitecore CMS. You would think that getting the URL for an object within the editor was easy, however, the Sitecore UI can be tricky to figure out at times. This is especially true when you are working with content a long way down the content tree. Making content editors lives easier is one of the key aspects of implementing a successful web project. If you can make using the editor simpler for editors, you will be known as a legend at work! Making it easy for an editor to find out a page URL is something I recommend you do on every Sitecore project. If you want to learn how to make your content lives easier by providing a one-click solution to get the live Url for a page, this is the tutorial for you 🔥🔥🔥

How To Get The Page Url For A Sitecore Item

There are a few ways to get the URL, however, I think the best way is to use a marketplace extension called Item URL Tool. The Item URL Tool is a free Sitecore module that you can install that does what it says on the can. It renders an items URL within the editor. After installing it, when you right-click on any bit of content under the 'Content' node, you should see a new context menu option:

How To Get The Url for a Content item within Sitecore 1

To retrieve a URL, right-click on a content item and you will be shown a dialogue box containing the Url.

How To Get The Url for a Content item within Sitecore 2

There is a handy shortcut combination to access the Url. Simply click Ctrl + C to copy it. Trying to highlight the text won't work using your mouse will not work 😕. After installing the module, these files will get added to your project:

  • App_ConfigIncludeItemUrlHelper.config
  • binVelir.SitecoreLibrary.dll
  • binVelir.SitecoreLibrary.Modules.Contextualizer.dll
  • binVelir.SitecoreLibrary.Modules.ItemUrlHelper.dll]

Make us you add them into source-control, so the module works on your other environments 😉

Getting the Url in Sitecore is not intuitive. using a package will make it much easier. I highly recommend you install the Item Url Tool within your project. Happy Coding 🤘