Hello...
I have developed an event system using CouchCMS and am currently building out some entries for the calendar. However, rather than using the native "Publish Date" as the input field for each event date, I have used a <cms:editable> field called "event_date" with a type of "datetime". I prefer not to use "Publish Date" for a variety of reasons.
Here are the parameters I am collecting for this "event_date" field:
Therefore, now that I am implementing the "Event Calendar" shown in the CouchCMS documentation, I would like the query for each day to be based on the "event_date" custom field rather than the native "Publish Date" as it is currently set up. Below is the code for my calendar thus far:
How can I modify this code to use the "event_date" editable field rather than the "publish date"?
Would appreciate any help. Thanks.
I have developed an event system using CouchCMS and am currently building out some entries for the calendar. However, rather than using the native "Publish Date" as the input field for each event date, I have used a <cms:editable> field called "event_date" with a type of "datetime". I prefer not to use "Publish Date" for a variety of reasons.
Here are the parameters I am collecting for this "event_date" field:
- Code: Select all
<cms:editable
name='event_date'
label='Event Date'
desc='Enter the day and time of the event in Eastern Standard Time'
type='datetime'
format='Y-m-d H:i'
allow_time='1'
am_pm='1'
required='1'
/>
Therefore, now that I am implementing the "Event Calendar" shown in the CouchCMS documentation, I would like the query for each day to be based on the "event_date" custom field rather than the native "Publish Date" as it is currently set up. Below is the code for my calendar thus far:
- Code: Select all
<cms:calendar date="<cms:gpc 'cal' />" masterpage=k_template_name show_future_entries='1' >
<div class="h2">
<a href="<cms:concat k_page_link '?cal=' k_prev_calendar_date />"> << </a>
<cms:date k_calendar_date format='F Y' /></th>
<a href="<cms:concat k_page_link '?cal=' k_next_calendar_date />"> >> </a>
</div>
<table class="calendar_big">
<tr>
<cms:repeat count='7'>
<td class="months_heading"><cms:zebra 'Su' 'M' 'T' 'W' 'Th' 'F' 'S'/></td>
</cms:repeat>
</tr>
<cms:weeks>
<tr>
<cms:days >
<cms:if k_timeline_position='present'>
<cms:set tdclass='today' />
<cms:else />
<cms:set tdclass='' />
</cms:if>
<cms:if k_position='current_month' >
<cms:if k_count_entries >
<td class='entries <cms:show tdclass />' align='center'>
<cms:show k_day />
<ul>
<cms:entries limit='2'>
<li style="margin-bottom: 3px;">
<a href="https://www.cvent.com/d/<cms:show cventcode />"><cms:show event_title /></a>
</li>
</cms:entries>
</ul>
</td>
<cms:else />
<td class='<cms:show tdclass />' ><cms:show k_day /></td>
</cms:if>
<cms:else />
<td class='other_month'><cms:show k_day /></td>
</cms:if>
</cms:days>
</tr>
</cms:weeks>
</table>
</cms:calendar>
How can I modify this code to use the "event_date" editable field rather than the "publish date"?
Would appreciate any help. Thanks.