I can't get my Table of contents to work in this new template I'm making. I've been using CM for a couple of years now, so I'm pretty experienced in building templates. As far as I know, everything is neatly coded, but the single lines containing repeatertitle="true" just don't show up in the TOC. Here is a link to the actual HTML template.
I've used this to generate the table of contents
<ul class="tocul"> <tableofcontents> <li class="tocli"><repeatertitle /></li> <li class="tocli">hoi hoi</li> </tableofcontents> </ul>
Then my <repeater> opens and I'm using tables with <layout label="blah"> to make content editable
<layout label="Text"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td> <h2><singleline label="Title" repeatertitle="true">Title</singleline></h2> <h5><singleline label="Subtitle">Subtitle if needed</singleline></h5> <multiline label="Content"> <p>Place content</p> </multiline> <p><strong><singleline label="Read more">Read more link</singleline></strong></p> </td> </tr> </table> </layout>
After my last table, I'm closing with </repeater>. I've tried a lot to figure out why my repeater titles aren't showing up in the TOC, but I'm lost here. Can anybody see what's going on?
Thanks a lot,
Hey there Jop, the good news is your code is superb - I really can't fault it. The bad news is that you can only have one <tableofcontents> per template, so the one you have in your preheader is disabling the later instance in your email content. If you remove the tag from your preheader, then the list of repeatertitles will appear.
Happy to add your vote for multiple <tableofcontents> - it sure would be useful in this instance!
Thanks for the compliment and the solution: it's fixed.
Great to hear, Jop - all the best! :D
From Australia to Zimbabwe, and everywhere in between, companies count on Campaign Monitor for email campaigns that drive real business results.Get started for free