I’m trying to make JSON data from a MailChimp (newsletter) plugin available to Twig.
I’ve added this code to my newsletter.php file:
$this->config->set(‘plugins.newsletter.X’, $addMember);
and this to newsletter.md:
{{ config.plugins.newsletter.X.addMember }}
as advised here.
When submitting the newsletter form I’m receiving the following error:
Use of undefined constant plugins - assumed 'plugins
Any ideas where I should define ‘plugins’ or how I should change the syntax?
Is it just me or ‘X.whatever.variable’ in:
{{ config.plugins.X.whatever.variable }}
is not very clear?