Universal Section Sub-Titles?

Hi team!

Is there a way to add a subtitle below a vertical’s sectionTitle in universal search? I searched the Customizing Your Pages HH article and didn’t find it.

Thank you!

Hey Ryan,

The pre-built universal section templates that exist in the Theme do not support adding a subtitle by default, but you can do so by overriding the Theme and customizing the template partial as needed.

In the Theme, there are four default Universal Section Templates to choose from for representing your verticals in Universal Search. There is a standard template as well as three variations of a grid template. I will walk through an example of overriding and customizing the standard template for a given vertical.

  1. Use the “Override Theme” Jambo Command to fork the standard template which can be found at universalsectiontemplates > standard.hbs.

  2. Once you fork the template, you will find the forked version in the universalsectiontemplates folder that exists outside of the Theme. Rename this file something related to the vertical it will be used for. In this example, this will be used for the Help Articles vertical, so I renamed my forked template partial as helpArticle.hbs.

  3. After forking the template, you’ll notice that a change was made to your jambo.json file - your newly forked file was added to the partials array. This will still say universalsectiontemplates/standard.hbs after you change the name of the file. Make sure to change the name to exactly match the renaming of the file from Step 2. Here is a screenshot for reference:
    Screen Shot 2021-11-03 at 11.46.30 AM

  4. Now it’s time to edit the forked template partial to add the subtitle. Below is a screenshot of how I decided to adjust the template for my Help Articles vertical. I removed the icon div entirely, as I no longer wanted it, and added a subtitle. Feel free to customize this however you see fit!

  5. The final step is making sure that the vertical in question, Help Articles in my case, is using this newly created template. Navigate to the verticalsToConfig object within your index.json file and make sure the vertical is referencing the forked partial as the universal section template:

Now you should see your subtitle on Universal! The last step is adding any CSS styling you’d like to format the subtitle. Below you can see that my Help Articles vertical now has a subtitle! You could replicate this process for any and all verticals.

Best,
DJ