# Inject kibana topbar with timeFilter into custom plugin

**URL:** <https://discuss.elastic.co/t/inject-kibana-topbar-with-timefilter-into-custom-plugin/114895>\
**Category:** Kibana\
**Created:** [January 10, 2018, 2:31pm UTC](https://discuss.elastic.co/t/inject-kibana-topbar-with-timefilter-into-custom-plugin/114895 "2018-01-10T14:31:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![karev](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/karev/32/26421_2.png) [@karev](https://discuss.elastic.co/u/karev)\
**Post date:** [January 10, 2018, 2:31pm UTC](https://discuss.elastic.co/t/inject-kibana-topbar-with-timefilter-into-custom-plugin/114895/1 "2018-01-10T14:31:05Z")

</div>

Hello commmunity it's possible to inject the kibana topbar with the timeFilter into my plugin ??

im using kibana 5.4.1 and i generated the plugin using the [https://github.com/elastic/template-kibana-plugin/](https://github.com/elastic/template-kibana-plugin/)

Thank you in advance.

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [January 10, 2018, 4:04pm UTC](https://discuss.elastic.co/t/inject-kibana-topbar-with-timefilter-into-custom-plugin/114895/2 "2018-01-10T16:04:38Z")

</div>

Hello,

You can look at how it was done in this plugin: [https://github.com/nyurik/kibana-vega-vis](https://github.com/nyurik/kibana-vega-vis) but the gist of it is to get the timefilter from the dependency injector and then call `getRange` on it.

---

<div class="post-metadata">

**Author:** ![karev](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/karev/32/26421_2.png) [@karev](https://discuss.elastic.co/u/karev)\
**Post date:** [January 10, 2018, 4:12pm UTC](https://discuss.elastic.co/t/inject-kibana-topbar-with-timefilter-into-custom-plugin/114895/3 "2018-01-10T16:12:11Z")

</div>

hello marius\_dragomir,

thank you for your response but my problem is not how to access the timefilter inside my controller but how to user directive inside my template and it show the topbar with the range filter on the ui.

---

<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:** [February 7, 2018, 4:12pm UTC](https://discuss.elastic.co/t/inject-kibana-topbar-with-timefilter-into-custom-plugin/114895/4 "2018-02-07T16:12:17Z")

</div>

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