1

How can I access plugin settings in the template?

I have config.php file defined in plugin directory and i want to access these values (or their overwritten values) in Twig templates.

I tried {{craft.pluginHandle.getSettings}} but it didn't work, it throws an error that such a method does not exist.

1

This should do it:

craft.app.getPlugins().getPlugin('pluginHandle').getSettings()
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.