# (לא מומלץ) שינוי תבניות Discourse מתבניות עיצוב או תוסף

**URL:** https://meta.discourse.org/t/not-recommended-overriding-discourse-templates-from-a-theme-or-plugin/247487
**Category:** Developer Guides
**Tags:** how-to
**Created:** [2 בדצמבר,‏ 2022,‏ 1:52pm UTC](https://meta.discourse.org/t/not-recommended-overriding-discourse-templates-from-a-theme-or-plugin/247487 "2022-12-02T13:52:58Z")
**Posts on this page:** 1
**Showing post:** 13

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [7 במרץ,‏ 2024,‏ 1:17pm UTC](https://meta.discourse.org/t/not-recommended-overriding-discourse-templates-from-a-theme-or-plugin/247487/13 "2024-03-07T13:17:34Z")

</div>

> [@merefield](#):
>
> gave us the ability to hook into existing code at multiple levels, reducing a lot of breaking change risk

Yeah I hear you - there were some nice things about widget extensibility APIs.

But the flip side is that it’s been incredibly difficult for us to modify ANY of the widget-based UI in core, because we have no idea what random methods/decorations people might be introducing. That’s why widget customisations have seemed relatively stable - we’ve been too scared to touch the core implementations.

> [@merefield](#):
>
> we could target just small blocks in clever ways

Our solution for this going forward is [Wrapper Plugin Outlets](https://meta.discourse.org/t/using-plugin-outlet-connectors-from-a-theme-or-plugin/32727#wrapper-outlets-2). These allow themes and plugins to optionally override very small chunks of templates with their own implementation.

For example, see how Chat conditionally [overrides the home-logo](https://github.com/discourse/discourse/blob/a9371a2a8777cdf1db7f3c10b85cfe6a84837869/plugins/chat/assets/javascripts/discourse/connectors/home-logo-wrapper/chat-header-connector.hbs#L1-L1) with [a custom component](https://github.com/discourse/discourse/blob/a9371a2a8777cdf1db7f3c10b85cfe6a84837869/plugins/chat/assets/javascripts/discourse/components/chat-header.gjs#L49-L66). That works for the existing widget-based header, and the new glimmer-based header (coming soon! ™)

We’re generally happy to accept PRs to add new wrapper outlets in various places. If you’re unsure about a particular use-case, please feel free to open a #Development topic with details!

---

_[View the full topic](https://meta.discourse.org/t/not-recommended-overriding-discourse-templates-from-a-theme-or-plugin/247487)._
