Setting custom browser title field in SXA

Setting custom field as Browser Title in SXA

This is one of these things that are super obvious when you know about them, but you may waste some time to figure it out if you were not aware that it exists out of the box. This short post is here to save your time and show you how cool is Sitecore Experience Accelerator. 🙂

The new “browser title” field

Imagine that you got a task to create a new field called “Browser title”, which will be a part of every page on your site. As the name suggests, this field will be responsible for rendering the title in the browser tab. The solution below has been applied in Sitecore 9.1 and SXA 1.8.

The implementation of this requirement is super simple. You do not need any custom code for this, it is possible to change the field that will be used to render the browser title using the out of the box SXA settings!

After creating the new field in Sitecore and adding it to the base page, which will be inherited in every newly created page template, you can go to:

/sitecore/content/Tenant/YourSite/Settings/Browser Title/Title

and change the name of the field that will be used to render the page title in the browser. Publish all the modified items and this is it!

Custom Browser Title field in SXA

1 comment

comments user
JP

This is gold – thanks!!

Leave a Reply

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