mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 08:57:10 -06:00
DEV: Deprecate CustomHTML hbs templates (#20264)
This is an old system for introducing custom content into Discourse. Nowadays, plugins and themes should be using Plugin Outlets for this.
This commit is contained in:
parent
5f4623ba47
commit
5dc2c0b5a2
@ -1,6 +1,7 @@
|
||||
import Component from "@ember/component";
|
||||
import { getCustomHTML } from "discourse/helpers/custom-html";
|
||||
import { getOwner } from "discourse-common/lib/get-owner";
|
||||
import deprecated from "discourse-common/lib/deprecated";
|
||||
|
||||
export default Component.extend({
|
||||
triggerAppEvent: null,
|
||||
@ -16,6 +17,10 @@ export default Component.extend({
|
||||
} else {
|
||||
const template = getOwner(this).lookup(`template:${name}`);
|
||||
if (template) {
|
||||
deprecated(
|
||||
"Defining an hbs template for CustomHTML rendering is deprecated. Use plugin outlets instead.",
|
||||
{ id: "discourse.custom_html_template" }
|
||||
);
|
||||
this.set("layoutName", name);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user