Config.theme empty

I’m trying to access values from config.theme from within partials/navigation.html.twig

Just debugging and trying to display the values. These all display empty. You’d think at least dump(config.theme) would display something. Empty. What am I doing wrong?

{% set theme_config = attribute(config.themes, config.system.pages.theme) %}

theme_config: {{ dump(theme_config) }}

config theme: {{ dump(config.theme) }}

theme dropdown: {{ theme_config.dropdown.enabled }}

latierra dropdown: {{ latierra.dropdown.enabled }}

dropdown: {{ dropdown.enabled }}

@bmcwilliams, Because of the labels you are using, my first guess is that you expect to see the dumps in the resulting Html.

However, unlike {{ var_dump() }}, {{ dump() }} does not display its results in the resulting Html page, but instead in the DebugBar which is shown in the browser like the ‘Developer Tools’ window.

To display the DebugBar, you have to enable debugging in /user/config/system.yaml:

debugger:
  enabled: true

You can find more information in the documentation on Debugging & Logging

Hope this helps…

Yes, you’re exactly right. I wrongly assumed that dump() displays results in the HTML. var_dump() displays results in HTML as you stated and I was able to track bugs this way. Thank you!