# In search result drop box: add given name next to username

**URL:** <https://meta.discourse.org/t/in-search-result-drop-box-add-given-name-next-to-username/48735>\
**Category:** UX\
**Created:** [2016年八月17日 13:07 UTC](https://meta.discourse.org/t/in-search-result-drop-box-add-given-name-next-to-username/48735 "2016-08-17T13:07:25Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![fantasticfears](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fantasticfears/32/119608_2.png) [@fantasticfears](https://meta.discourse.org/u/fantasticfears)\
**Post date:** [2016年八月20日 22:36 UTC](https://meta.discourse.org/t/in-search-result-drop-box-add-given-name-next-to-username/48735/3 "2016-08-20T22:36:46Z")

</div>

> [@rriemann](#):
>
> include\_name? is already there, but I don’t know how this is used.

It’s a magic trick to determine whether `name` should be included by the serializer. If it’s true, you can find that field in the JSON.

> [@rriemann](#):
>
> To display the name, one probably has to change some lines in here:

After that, Ember model and widget kicks in. Try `console.log(u)` in that function so that you can see what’s in the `u`. You could access name by `u.name` there. And you’ll need some `class` for colors probably.  
There is a site setting for displaying order of username and name. You could check that site setting and putting the name there.

You might find this useful:

> [@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…

---

_[View the full topic](https://meta.discourse.org/t/in-search-result-drop-box-add-given-name-next-to-username/48735)._
