# 我在哪里可以找到搜索字段的定义

**URL:** <https://meta.discourse.org/t/where-do-i-find-the-definition-of-the-search-field/86875>\
**Category:** Development\
**Created:** [2018年五月6日 12:47 UTC](https://meta.discourse.org/t/where-do-i-find-the-definition-of-the-search-field/86875 "2018-05-06T12:47:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nabeel](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nabeel/32/135402_2.png) [@nabeel](https://meta.discourse.org/u/nabeel)\
**Post date:** [2018年五月6日 12:47 UTC](https://meta.discourse.org/t/where-do-i-find-the-definition-of-the-search-field/86875/1 "2018-05-06T12:47:30Z")

</div>

Hi,  
I am in the processing of modifying the text fields in discourse using the jquery.ime plugin. I simply find the corresponding handlebar template and add the required javascript code. But I cannot find the hbs file containing the definition of search text field that appears at the top of the page. Can somebody please tell where can I find this definition?  
Thanks,

---

<div class="post-metadata">

**Author:** ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)\
**Post date:** [2018年五月10日 17:55 UTC](https://meta.discourse.org/t/where-do-i-find-the-definition-of-the-search-field/86875/2 "2018-05-10T17:55:18Z")

</div>

It’s [here](https://github.com/discourse/discourse/blob/be1cce503c3576426ac9759d88fdcab4c0b87be2/app/assets/javascripts/discourse/widgets/search-menu-controls.js.es6#L5), and it is a Widget. So you can’t find it in `.hbs` template files.

> [@A tour of how the Widget (Virtual DOM) code in Discourse works](https://meta.discourse.org/t/a-tour-of-how-the-widget-virtual-dom-code-in-discourse-works/40347):
>
> This is out of date. See [Widgets, the Widget API and their roadmap?](https://meta.discourse.org/t/widgets-the-widget-api-and-their-roadmap/292624) The latest builds of Discourse are much faster at rendering topics thanks to our [re-written post stream](https://eviltrout.com/2016/02/25/fixing-android-performance.html). I’ve written up [our new plugin API](https://meta.discourse.org/t/a-new-versioned-api-for-client-side-plugins/40051) but so far haven’t explained how the code all fits together. The purpose of this topic is to allow Discourse developers to understand how the new code works. What’s a Virtual DOM? A Virtual DOM is a data structure that enables browsers to re-render dynamic content very quickly. The techniq…
