Cannot put the template in the desired outlet

A few things to get you going again:

  • this file has an missing closing round bracket at the end of your
    apiInitializer call - that will just not work.

On fixing that issue I see more errors.

  • banner_plugin_outlet is not declared - you need a const here.

    you assign it twice? you don’t need it twice I suspect :slight_smile:

    banner_plugin_outlet = settings.banner_position
    
    export default apiInitializer("1.14.0", (api) => {
      try {
        banner_plugin_outlet = settings.banner_position
    
  • You are missing imports:

    import { htmlSafe } from "@ember/template";
    import themeSetting from "discourse/helpers/theme-setting";
    
  • … but I couldn’t get themeSetting to work as a helper here. No error, just blank, so try this code instead:

            get bannerTextContent() {
              return settings.banner_text_content;
            }
            <template>
              {{#if this.bannerIsFilled}}
                <div class='persistent-banner'>
                  <p>
                    {{htmlSafe this.bannerTextContent}}
    
  • Always check the console for errors.

6 Likes