- This topic has 2 replies, 2 voices, and was last updated 4 years, 5 months ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- The forum ‘How do I …’ is closed to new topics and replies.
Events Made Easy › Forums › How do I … › Events list template
Hi Franky,
I’ve built a template which is a list of events that needs to be different to the default which is configured in settings.
I’ve added the short code on the relevant page referring to the template and it works, showing the correct text and events associated with a particular category.
The problem is the table header repeats for each event and I can’t see why this is happening, hoping you can help?
URL: https://learning.necsu.nhs.uk/north-yorkshire-ccg-migration/
Template code:
<table style="width:100%">
<thead>
<tr>
<th width="25%">Date/Time</th>
<th>Appointment Details</th>
</tr>
</thead>
<tbody>
<tr>
<td style="border-right: 1px solid #cdd0d4">#_STARTDATE{l}, #_STARTDATE <br />#_STARTTIME - #_ENDTIME (#_AVAILABLESEATS spaces)</td>
<td>#_LINKEDNAME<br />#_LOCATIONNAME #_TOWN</td>
</tr>
</tbody></table>
the eme_events shortcode allows 3 templates to be used: template_id, template_id_header and template_id_footer. So you need to split your code in 3 parts.
Header:
<table style="width:100%">
<thead>
<tr>
<th width="25%">Date/Time</th>
<th>Appointment Details</th>
</tr>
</thead>
<tbody>
Content:
<tr>
<td style="border-right: 1px solid #cdd0d4">#_STARTDATE{l}, #_STARTDATE <br />#_STARTTIME - #_ENDTIME (#_AVAILABLESEATS spaces)</td>
<td>#_LINKEDNAME<br />#_LOCATIONNAME #_TOWN</td>
</tr>
Footer:
</tbody></table>
Worked a treat, didn’t realise I’d need to split into 3 templates.