Hamburger-categories widget does not mount?

I had it set to “Header Dropdown” I changed it to “Legacy” but same issue

1 Like

The hamburger menu shows, but I am after just the categories
{{mount-widget widget="hamburger-menu"}}

Apologies I was thrown by the widget name. What plugin outlet are you using?

the same as in the docs

<script type="text/x-handlebars" data-template-name="/connectors/below-footer/fancy-footer">
  <div class="footer">
    <div class="wrap">
      <p>before mounting a widget</p>
        {{mount-widget widget="home-logo"}}
        {{mount-widget widget="hamburger-categories"}}
      <p>after mounting a widget</p>

theme is here GitHub - tpximpact/bcn-discourse-theme I tried it on and problem remains

If you look at the guide you can see the plugin outlet takes an attribute showFooter. That’s probably false. Meaning that neither the footer nor the attached widget will show.

In any case why a footer outlet for a header artefact?

Use the plugin outlets theme component to pick a better location imho.

It does show… it shows widget=“home-logo”
and it also shows widget=“hamburger-menu”

but it doesn’t show widget=“hamburger-categories”

Just testing it out, doesn’t really matter where it is right now

1 Like

Any errors in the console?

What shows in the inspector?

1 Like

I can see categories here, so they do exist…

My guess is this is the problem:

There’s no attribute categories being passed via the footer outlet

but when i use widget=“hamburger-menu” in the footer outlet it shows the categories
I’ve tried other outlets around the page and problem persists

Had you posted that error message initially it would have saved a lot of time.

Always look at the console.

You may need to attach this one with JavaScript once you have retrieved the list of Categories in the same way the Hamburger menu does it.

1 Like

yeah definitely and even more time if the documentation didn’t say “Now, mounting a widget is pretty simple, all you need to know is the widget’s name. That’s it”

1 Like

Yeah my hunch is that guide is out of date?

Do you know where I can find the most up to date guide, I’m flying around in here trying to find answers but landing on posts that are 4 years old. Is there an actual guide document somewhere?

Yeah I can see how that would be misleading… technically it does mount the widget, but that doesn’t mean the data required by the widget is automatically available.

You can try passing the categories into the widget this way:

{{mount-widget widget="hamburger-categories" args=(hash}}
1 Like

Great thanks… yes that makes sense and is showing now

As we are here talking about logging in the console
When following the docs Beginner's guide to developing Discourse Themes
When i try

<script type="text/discourse-plugin" version="0.8">

I’m not sure I get a “global object to the console”, I get a class

And if i try something like

<script type="text/discourse-plugin" version="0.8">
  const settings = Discourse.SiteSettings;

I get this error
THEME 6 'BCN Theme - watched locally'] Deprecation notice: use injected siteSettings instead of Discourse.SiteSettings

1 Like

Yes, as you mentioned earlier unfortunately that guide is outdated. We’re in the midst of getting Ember up to date within Discourse, so hopefully we’ll be able to update our guides soon (or start being able to point to Ember’s documentation more often).

If you’re trying to get siteSettings you can do this

<script type="text/discourse-plugin" version="0.8">

  let siteSettings = api.container.lookup('site-settings:main');
  // example setting


@awesomerobot Morning, This is interesting news. I’m in the process a custom build discourse for a client. Having not used discourse before I was working my way through the docs and everything required seemed possible but now I’m not so sure.

An example of a required feature would be a to create a discourse plugin using a list of categories as buttons inside the hero

Could you help me understand

  • Which parts of the docs are out of date
  • Where I could get an up to date version of creating a custom plugin
  • Where else could I look to get an understanding of Ember
  • When the documentation will be updated, weeks/months?

Then I will be able to feed these issue back to the client

Many thanks