# How to display dashboard title on a custom header

**URL:** <https://discuss.elastic.co/t/how-to-display-dashboard-title-on-a-custom-header/111705>\
**Category:** Kibana\
**Created:** [December 14, 2017, 8:14am UTC](https://discuss.elastic.co/t/how-to-display-dashboard-title-on-a-custom-header/111705 "2017-12-14T08:14:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Karan\_Sharma](https://avatars.discourse-cdn.com/v4/letter/k/b5ac83/32.png) [@Karan\_Sharma](https://discuss.elastic.co/u/Karan_Sharma)\
**Post date:** [December 14, 2017, 8:14am UTC](https://discuss.elastic.co/t/how-to-display-dashboard-title-on-a-custom-header/111705/1 "2017-12-14T08:14:43Z")

</div>

I need to make a header on kibana for branding purpose.

I use a plugin to make a custom header, using the **hacks** uiExports. I am able to display the HTML and less code. Now i wan't to retrieve the name of the current dash board and display it there too.(pics below for clarity)

Any idea how can i access the name of the current dashboard in hacks.js?

 ![Capture](https://us1.discourse-cdn.com/elastic/original/3X/4/3/4336ebd22a2737692d1d5ec8afcc13cec980d800.PNG)

---

<div class="post-metadata">

**Author:** ![spalger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spalger/32/14092_2.png) [@spalger](https://discuss.elastic.co/u/spalger)\
**Post date:** [December 14, 2017, 8:21pm UTC](https://discuss.elastic.co/t/how-to-display-dashboard-title-on-a-custom-header/111705/2 "2017-12-14T20:21:07Z")

</div>

As the uiExport type suggests, you will need a bit of a hack.

Assuming your header is using an angular directive, you should be able to watch `$route.current.locals` and get information like the current dashboard, or visualization.

---

<div class="post-metadata">

**Author:** ![Karan\_Sharma](https://avatars.discourse-cdn.com/v4/letter/k/b5ac83/32.png) [@Karan\_Sharma](https://discuss.elastic.co/u/Karan_Sharma)\
**Post date:** [December 20, 2017, 6:53am UTC](https://discuss.elastic.co/t/how-to-display-dashboard-title-on-a-custom-header/111705/3 "2017-12-20T06:53:42Z")

</div>

> [@spalger](#):
>
> $route.current.locals

is undefined. that maybe because i'm not using a directive.

I using plain javascript in hack.js to do $('div.content').prepend(html\_template)

Even if a create a directive how will i inject it on top of the page (basically what $('div.content').prepend is doing)? Where should i actually use the directive?

Thanks

---

<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:** [January 17, 2018, 6:53am UTC](https://discuss.elastic.co/t/how-to-display-dashboard-title-on-a-custom-header/111705/4 "2018-01-17T06:53:58Z")

</div>

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