# How to create dynamic title in Markdown with Handlebars(mustache)?

**URL:** <https://discuss.elastic.co/t/how-to-create-dynamic-title-in-markdown-with-handlebars-mustache/339173>\
**Category:** Kibana\
**Created:** [July 25, 2023, 10:44am UTC](https://discuss.elastic.co/t/how-to-create-dynamic-title-in-markdown-with-handlebars-mustache/339173 "2023-07-25T10:44:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aigerim\_Kubanychbeko](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aigerim_kubanychbeko/32/123368_2.png) [@Aigerim\_Kubanychbeko](https://discuss.elastic.co/u/Aigerim_Kubanychbeko)\
**Post date:** [July 25, 2023, 10:44am UTC](https://discuss.elastic.co/t/how-to-create-dynamic-title-in-markdown-with-handlebars-mustache/339173/1 "2023-07-25T10:44:46Z")

</div>

I wonder if there any way to create dynamic title in the TVSB visualization using Markdown and Handlebars. This visualization is a part of the dashboard. Whenever I filter particular field: title.keyword is ... this title should appear in the visuzalization. I want to automate the process.

I would highly appreciate your help !

---

<div class="post-metadata">

**Author:** ![markov00](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/markov00/32/33316_2.png) [@markov00](https://discuss.elastic.co/u/markov00)\
**Post date:** [July 27, 2023, 2:39pm UTC](https://discuss.elastic.co/t/how-to-create-dynamic-title-in-markdown-with-handlebars-mustache/339173/2 "2023-07-27T14:39:09Z")

</div>

I can't find a way to do that in TSVB unfortunately. You can achieve something if you know that particular field by configuring a groupBy aggregation (top 1) and use a markdown like:

```auto
Title: {{#each _all}}{{label}}{{/each}}

```

This works until you have at least one filter enabled, but when your filter is disabled/removed then this will just show the top most label.  
There is no way to get the count of returned groups to display something else instead.

You can try with Vega a similar approach, I'm pretty sure you can get the same information but you can certainly do more math than the one available in TSVB markdown

---

<div class="post-metadata">

**Author:** ![Aigerim\_Kubanychbeko](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aigerim_kubanychbeko/32/123368_2.png) [@Aigerim\_Kubanychbeko](https://discuss.elastic.co/u/Aigerim_Kubanychbeko)\
**Post date:** [August 11, 2023, 7:50am UTC](https://discuss.elastic.co/t/how-to-create-dynamic-title-in-markdown-with-handlebars-mustache/339173/3 "2023-08-11T07:50:37Z")

</div>

Thank you so much.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 8, 2023, 7:50am UTC](https://discuss.elastic.co/t/how-to-create-dynamic-title-in-markdown-with-handlebars-mustache/339173/4 "2023-09-08T07:50:44Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
