Activate plugin by template

I would like to activate the TOC plugin only on pages based on a specific twig template. Is there a way to set a configuration setting through a template?

Hi @cord,

well I’d like to know it, too. But even when setting a configuration option via a template is possible, changing values in Twig is far too late for this plugin (either it is loaded and active or it is disabled completely). If nothing helps, I can add an option maybe, which makes it possible (i.e loads Toc but don’t process pages). Then you can use the Twig filter to do it in your template…

But I’d like to know whether there are other solutions :slight_smile:

would it be possible to have a white / black list by route? otherwise an option to process the plugin later would work as well I think.