最近搜索


没有最近搜索

Change page title and 'breadcrumbs'



已于 2023年10月20日 发布

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 条评论

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


请先登录再写评论。

找不到所需的内容?

新建帖子