This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
If I insert a Table Of Content block in a content template then they do not show on the frontpage.
It could be a plugin conflict or it could simply be the way a content template is rendered in toolset. Before the latest update of toolset the UltimateGutenberg plugin Table Of Content worked, but after updating toolset, both UltimateGutenberg and Kadence Table of Content plugin works.
And I expect that its a matter of rendering the content templates, with content. When the content templates are rendered, it is probably after the table of contents are generated, because I expect them to have low priority, and since I have conditional display inside the content template they may not be able to see the title tags and generate the TOC.
You can see how I struggle with the Kadence TOC block here : hidden link
But as I wrote above, the UltimateGutenberg TOC stopped working as well, after the latest toolset update.
Perhaps Toolset should build a TOC block, when you use content templates and conditional output toolset may be the best company to understand how the rendering process works after all.
Thank you for contacting us and I'd be happy to assist.
I've performed some tests on my website with the "Table of contents" block from the "Ultimate Addons for Gutenberg" plugin and it worked as expected, from within the Toolset content template.
Can you please share temporary admin login details for a website where this conflict can be seen? Please also share a link to an example page.
Note: Your next reply will be private and please make a complete backup copy, before sharing the access details.
Well I tried the deactivation dance of themes and plugins, but even after deactivating plugins and switching theme I continued to have the problem with Kadence TOC and the content template rendering.
The only plugins not deactivated was kadence and toolset. and the problem remained.
I am not that fund of giving access to a live site, I may create a staging site for you to debug, but before I do that, I will move the site to a local instance and see if I can debug the issues using XDebugger.
If you have any hints on where I should place a breakpoint, please let me know. 🙂
Thanks for writing back.
I was able to reproduce the issue with the table of contents block from the "Kadence Blocks" plugin, but not with the one from the "Ultimate Addons for Gutenberg" plugin.
I've shared this report about the block from the "Kadence Blocks" plugin with the concerned team for further review and will keep you updated through this ticket.
Meanwhile, I'll recommend testing the Table of contents block from the "Ultimate Addons for Gutenberg" plugin, as I couldn't find any issue with that on my test website.
( ref: https://wordpress.org/plugins/ultimate-addons-for-gutenberg/ )
I did use the ultimate Gutenberg plugin, but it stopped working. The only thing displayed was the title of the plugin but nothing else..
I have contacted Kadence support and got an answer from Ben, and he wrote this :
"The table of contents block is designed to build a table of contents based on the post content. It's not built on post output. It's created based on the database information about the particular post. So it can't be aware of the headings that you are adding in the content template because it's designed to look at the post information in the post content. This is why for example headings added in your footer or in your sidebar wouldn't be added to the table of contents.
In your case, it appears all your headings are added conditionally through the content template and not in the post/page itself and this isn't a use case that the table of contents block can reasonably cover."
So in other words, The Kadence TOC reads the Heading tags from the post field in the database, and this will never be generated dynamically using a content template.
And he does have a point. If the TOC did not read the post field in the database, it would render the content of the TOC to include all other heading tags, not only those displayed in the content, but generated in sidebars, footers etc. And you really do not want that to happen. The TOC should only include Headings from the article and not the entire page.
I expect that Ultimate Gutenberg does the same, and this explains why it does not work for conditional content.
So I believe that the only way to handle this with content templates, must be if toolset made the TOC block because all other plugin vendors does not take the content template into consideration.
Thanks for writing back.
I've shared this report about compatibility with the Table of contents block from Kadence Blocks, as a feature request.
As I couldn't reproduce the issue between the Table of contents block from Ultimate Addons for Gutenberg plugin and Toolset content template, you're welcome to share temporary admin login details for a website where this issue can be seen/reproduced. I'll investigate and report it accordingly too.
Note: I've set your next reply as private.
I have ditched to use the TOC in the content template, because Kadence does not work and Ultimate gutenberg only partly works, and is just too unstable with content tempaltes.
I hope that Toolset will consider building a TOC block in the future that is designed to work with the content template, because that might be the only way we will get a TOC that works perfectly and keep the performance in mind as well.
Thanks for the update and I'll be happy to pass this feature request, internally.
You're welcome to mark this ticket as resolved and start a new one for each new question and concern.