I find that, having installed the plugin, on some pages I want a TOC on others not. It's easy enough to wrap all the twig template elements in a conditional:
{% if meta.TOC %}
<link rel="stylesheet" href="{{ plugins_url }}/mcb_TableOfContent/style.css">
{% endif %}
{% if meta.TOC %}{{ mcb_toc_top | raw }}{% endif %}
{% if meta.TOC %}{{ mcb_toc | raw }}{% endif %}
But alas the PHP part of the plugin still ends up putting the text of mcb_toc_top_txt after each header. This should ideally not happen if a page doesn't want a TOC of course.
I find that, having installed the plugin, on some pages I want a TOC on others not. It's easy enough to wrap all the twig template elements in a conditional:
But alas the PHP part of the plugin still ends up putting the text of
mcb_toc_top_txt
after each header. This should ideally not happen if a page doesn't want a TOC of course.