We are transitioning over to a new forum platform. Please post new issues there. Existing threads will be dealt with here unless you choose to move them over. Visit the new forum
Is it possible to create a template that allows editors to build a table on the fly?
I have tried using blocks to achieve it but can't get my head around whether it is possible or not.
Here is my code for the template but the blocks don't show up in the editor.
<h3><perch:content id="heading" type="text" label="Heading" title="table title if required"></h3> <perch:before><div class="table--responsive"> <table class="table--stripes"> </perch:before> <perch:blocks> <perch:block id="table-header-section" title="Header row(s) of table"> <thead> <tr> <th><perch:content id="headertext" type="text" label="Text" html editor="ckeditor" required title="table header cell text"></th> </tr> </thead> </perch:block> <perch:block id="table-body-section" title="Body row(s) of table"> <tbody> <tr> <td> <perch:content id="bodytext" type="text" label="Text" required title="table header cell text"> </td> </tr> </tbody> </perch:block> </perch:blocks> <perch:after> </table> </div> </perch:after>
And even if they did show up in the editor, they would only allow me to put in one header cell and one data cell per table.
Want to reply to this thread?Login with Perch