# عرض حقل المشاركة المخصص في قائمة الأعلام

**URL:** <https://meta.discourse.org/t/rendering-custom-post-field-in-flagged-queue/81991>\
**Category:** Development\
**Created:** [2 مارس 2018، 6:13م UTC](https://meta.discourse.org/t/rendering-custom-post-field-in-flagged-queue/81991 "2018-03-02T18:13:21Z")\
**Posts on this page:** 1\
**Showing post:** 15

<div class="post-metadata">

**Author:** ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)\
**Post date:** [16 مارس 2018، 5:58م UTC](https://meta.discourse.org/t/rendering-custom-post-field-in-flagged-queue/81991/15 "2018-03-16T17:58:40Z")

</div>

> [@george.thomson](#):
>
> My idea in reopening FlaggedPost was to query separately and “inject” my field into it. If I modify the query that builds the FlaggedPost then I wouldn’t need to do that right? But there is no way to override the query building, I would have to have an extension point as you point out but that is not presently in the code as far as I can tell right? It would be something akin to the plugin outlets in templates, but for query building?

Yes if you modify the query that builds the FlaggedPost on the server side (that SQLBuilder I sent across) the properties would just be there. Adding an extension point there could be something like:

```plaintext
  # in flagged_posts_report, after posts.map!(&:marshal_dump)
  posts = FlagPostQuery.load_extra_data(posts)

```

Then you could add an identity method like:

```plaintext
def self.load_extra_data(posts)
  posts
end

```

Then in your plugin.rb you could do:

```plaintext
add_class_method(:flag_query, :load_extra_data) do |posts|
  # Shove the extra data in `posts` here
  posts
end

```

> [@george.thomson](#):
>
> Is there a reason doing the reopen and inject method would not work? Is there no way to query for my custom field from that side?

You can reopen the class in the front end, but when would you load the data? In general our application expects data to be loaded before a route is entered. There are exceptions, such as clicking on a button to load more data.

---

_[View the full topic](https://meta.discourse.org/t/rendering-custom-post-field-in-flagged-queue/81991)._
