Hello! As requested here is the original question! I was reading through the docs and I discovered a functionality that I really need to use, it's using the repeatable tag. Now it seems fairly simple to implement, but the code that I'm trying to make repeatable is what's making it complicated. The code I'm using is with Foundation's Accordion function, you can view that here: http://foundation.zurb.com/docs/components/accordion.html. I added a table inside, and the following is my code for two accordions:
I basically want to do the following:
1) I want to make everything within the <dd></dd> element repeatable. I want to make it so that I can go into the CMS and add and delete <dd>'s.
2) I also need to do something about the <a> and <div> ID tag that is needed for them to work together (#panel1 for example) so that when it's repeated it won't be the same ID, I could just add a text field in the CMS for that and use a <cms:show> tag I think though?
3) In the <a> tag there's a month and year and then a <span> with something else in it, I want to make that month and year (March, 2014) editable.
4) I want to make the table (technically just the contents within the <tbody>) editable. I don't want to be able to delete the table from the CMS though but remove and add rows, which I can do using richtext I believe, not sure if you have any ideas for this.
- Code: Select all
<dl class="accordion" data-accordion>
<dd>
<a href="#panel1">March, 2014 <span class="click hide-for-small-only show-for-medium-up">click to open</span></a>
<div id="panel1" class="content table-scroll">
<table>
<thead>
<tr>
<th width="40%">Date</th>
<th width="25%">Days</th>
<th width="25%">Time</th>
<th width="10%">Register</th>
</tr>
</thead>
<tbody>
<tr>
<td>March 1st, 4th, April 1st, 4th</td>
<td>Tuesdays</td>
<td>6pm to 9:30pm</td>
<td class="button-center"><a href="register.php" class="button tiny radius">Register</a></td>
</tr>
<tr>
<td>March 1st, 4th, April 1st, 4th</td>
<td>Long Weekends</td>
<td>9am to 2:45pm</td>
<td class="button-center"><a href="register.php" class="button tiny radius">Register</a></td>
</tr>
<tr>
<td>March 1st, 4th, April 1st, 4th</td>
<td>Saturday, Sunday</td>
<td>9am to 2:45pm</td>
<td class="button-center"><a href="register.php" class="button tiny radius">Register</a></td>
</tr>
</tbody>
</table>
</div>
</dd>
<dd>
<a href="#panel2">April, 2014 <span class="click hide-for-small-only show-for-medium-up">click to open</span></a>
<div id="panel2" class="content table-scroll">
<table>
<thead>
<tr>
<th width="40%">Date</th>
<th width="25%">Days</th>
<th width="25%">Time</th>
<th width="10%">Register</th>
</tr>
</thead>
<tbody>
<tr>
<td>March 1st, 4th, April 1st, 4th</td>
<td>Tuesdays</td>
<td>6pm to 9:30pm</td>
<td class="button-center"><a href="register.php" class="button tiny radius">Register</a></td>
</tr>
<tr>
<td>March 1st, 4th, April 1st, 4th</td>
<td>Long Weekends</td>
<td>9am to 2:45pm</td>
<td class="button-center"><a href="register.php" class="button tiny radius">Register</a></td>
</tr>
<tr>
<td>March 1st, 4th, April 1st, 4th</td>
<td>Saturday, Sunday</td>
<td>9am to 2:45pm</td>
<td class="button-center"><a href="register.php" class="button tiny radius">Register</a></td>
</tr>
</tbody>
</table>
</div>
</dd>
</dl>
I basically want to do the following:
1) I want to make everything within the <dd></dd> element repeatable. I want to make it so that I can go into the CMS and add and delete <dd>'s.
2) I also need to do something about the <a> and <div> ID tag that is needed for them to work together (#panel1 for example) so that when it's repeated it won't be the same ID, I could just add a text field in the CMS for that and use a <cms:show> tag I think though?
3) In the <a> tag there's a month and year and then a <span> with something else in it, I want to make that month and year (March, 2014) editable.
4) I want to make the table (technically just the contents within the <tbody>) editable. I don't want to be able to delete the table from the CMS though but remove and add rows, which I can do using richtext I believe, not sure if you have any ideas for this.