KK,
I have the following code that I am using to show pages that have a status (editable radio button field in clonable template) of NOT "archive".
I then want to compare my input field called "end_date" with current date and if the end_date is less than (before) the current date, set the "status" of the editable input field to "archive" so it does not show up on the display page.
Am I going about this the right way?
Thanks
I have the following code that I am using to show pages that have a status (editable radio button field in clonable template) of NOT "archive".
I then want to compare my input field called "end_date" with current date and if the end_date is less than (before) the current date, set the "status" of the editable input field to "archive" so it does not show up on the display page.
- Code: Select all
<cms:pages masterpage='sale_template.php' show_future_entries='1' limit='100' paginate='1' custom_field="sale_month==October | status!==archive" order='asc' orderby='start_date'>
<cms:set sale_end="<cms:date end_date format='Y-m-d H:i:s' />" />
<cms:set current_date="<cms:date format='Y-m-d H:i:s' />" />
<cmsif: sale_end lt current_date><cms set status='archive'>
</ cms:if>
Am I going about this the right way?
Thanks