# Getting joined data for widget scope

**URL:** <https://meta.discourse.org/t/getting-joined-data-for-widget-scope/42264>\
**Category:** Development\
**Created:** [Avril 8, 2016, 10:00 UTC](https://meta.discourse.org/t/getting-joined-data-for-widget-scope/42264 "2016-04-08T22:00:01Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![stevenpslade](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stevenpslade/32/53550_2.png) [@stevenpslade](https://meta.discourse.org/u/stevenpslade)\
**Post date:** [Avril 8, 2016, 10:00 UTC](https://meta.discourse.org/t/getting-joined-data-for-widget-scope/42264/1 "2016-04-08T22:00:01Z")

</div>

Continuing the discussion from [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):

If I want to access something outside the scope of a widget that only has access to the `User` object, how would I do? I am specifically trying to show a `custom_field` beside the user’s name in a post.

I was thinking of doing something like this in `poster-name` widget:

`contents.push(h('span.post-user-location', attrs.custom_fields.location));`

Any advice?

Furthering this though: how can you tell what `attrs` a widget has access to?

---

_[View the full topic](https://meta.discourse.org/t/getting-joined-data-for-widget-scope/42264)._
