# إضافة دعم لإعدادات السمة

**URL:** <https://meta.discourse.org/t/add-support-for-theme-settings/78103>\
**Category:** Feature\
**Created:** [15 يناير 2018، 10:32م UTC](https://meta.discourse.org/t/add-support-for-theme-settings/78103 "2018-01-15T22:32:53Z")\
**Posts on this page:** 1\
**Showing post:** 21

<div class="post-metadata">

**Author:** ![Osama](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/osama/32/98013_2.png) [@Osama](https://meta.discourse.org/u/Osama)\
**Post date:** [12 أبريل 2018، 5:54م UTC](https://meta.discourse.org/t/add-support-for-theme-settings/78103/21 "2018-04-12T17:54:03Z")

</div>

There is actually an issue with the precompiler that it doesn’t recognize `this` as the template’s context object. However, I just realized that we don’t really need the precompiler to recognize `this` because the helper function [here](https://github.com/discourse/discourse/blob/09c5e1018aba419b10c1123966e6c131efd5b449/app/assets/javascripts/discourse/helpers/theme-setting-injector.es6#L23) is bound to the template context object, so `this` inside the helper function refers to the template context, which is exactly what we need here. Will put together PR to demonstrate what I mean.

EDIT:

PR sent: [FEATURE: theme settings in RAW hbs templates by OsamaSayegh · Pull Request #5758 · discourse/discourse · GitHub](https://github.com/discourse/discourse/pull/5758) cc @vinothkannans

Tested this change with 4 different scenarios:

- overriding an Ember template
- overriding a raw template
- using a plugin outlet in an Ember template
- using a plugin outlet in a raw template

And it worked in all of them 🎉

---

_[View the full topic](https://meta.discourse.org/t/add-support-for-theme-settings/78103)._
