Latest tweets plugin not showing as enabled in twig


Perhaps someone can explain this to me, I seem to be struggling with Latest tweets.
Obviously I have all the relevant details from Twitter, and the plugin shows as enabled, and the config shows as enabled as well. Ive read through the docs from the developer and that is not helping either.

I want to display it in the sidebar. Looking at sidebar.html.twig, I constructed something like this assuming it at least display the title if the plugin was enabled.

{% if config.plugins.latest-tweets.enabled %}

{{ display title here }}

{% pull info here etc %}
{% endif %}

But this doesn’t seem to work, its not displaying even the title. Looking in config there seems to be the latest-tweets relevant files, but again looking in the sidebar.html.twig it seems to be pulling bits of info, with some attributes like taxonomy there seems to be no relevant file in the config that I can see - config.plugins.taxonomylist.enabled in the code suggests that its looking in the config

Why is latest-tweets apparently not working?

Many thanks

@louigi ,

{% if config.plugins.latest-tweets.enabled %} is evaluating the result of substracting the values ‘config.plugins.latest’ and ‘tweets.enabled’, which is probably not what you want.

If you want to evaluate a variable of a plugin containing a dash (-) in its name, you should use:
{% if config.plugins['latest-tweets'].enabled %}

1 Like

@pamtbaau - thats fantastic - thanks