Recent searches


No recent searches

Change page title and 'breadcrumbs'



Posted Oct 20, 2023

We are looking for a way to update the 

  • page title
  • Breadcrumbs

We tried to use the code:

<script>
  document.title = 'YOUR NEW TITLE HERE';
</script>

But we have 2 issues with that: 

  • it does not change the breadcrumbs' name
  • we do not know how to use dynamic fields there

Does anybody have a similar issue/ know how to fix that?


0

3

3 comments

image avatar

Pulkit Pandey

Zendesk LuminaryCommunity Moderator

Hi Elena

Please, add the below code to update the text on the breadcrumbs on the new request page 

<script>
  var doc = document.querySelector(".breadcrumbs li:nth-child(2)");
  console.log(doc)
  doc.innerHTML = "YOUR NEW TITLE HERE"
</script>

Let me know if you need any further assistance.

Thanks 

Pulkit

Team Diziana

0


Hey Pulkit Pandey
Thanks for the swift reply. And how would I add the Dynamic content instead of "YOUR NEW TITLE HERE" ?

0


image avatar

Pulkit Pandey

Zendesk LuminaryCommunity Moderator

Hi Elena,

To add Dynamic Content, you can follow the below steps:

1. Open the document_head.hbs file and add the following code with your Dynamic Content Variable 

<script>
 var dc = "{{dc "copyright_text"}}";
</script>

2. Replace the script which was shared earlier with the one below.

<script>
var doc = document.querySelector(".breadcrumbs li:nth-child(2)");
  doc.innerHTML = dc
</script>

Let me know if you need any further assistance.

 

Thanks 

Pulkit

Team Diziana

0


Please sign in to leave a comment.

Didn't find what you're looking for?

New post