Posted: October 22, 2021 at 11:09 am
Currently working on customizing the Event Table View Template to display an extra column in my table. After searching the forum, I understand what I need to do to remove the time from the existing Date column which shows the next upcoming datetime for each event. These events are classes so, I’d like a column to display the Start Date of the event, basically to show the date of the first datetime for all events, and update the existing ‘Date’ column label to show as ‘Next Date’ (thinking this is only a label change since the functionality already shows the next datetime. Thanks in advance for your assistance. |
|
Hi there,
That column can also list ALL upcoming datetimes if preferred? Just add
Ok, so the simplest way to pull the ‘first’ datetime for the event order by start date/time is to use the method that is already in use in the template. It currently uses:
To pull in an array of datetime for the event order by start date/time and based on your shortcode attributes will pull in expired datetimes and either multiple or single datetimes. The above needs to stay as is for the template to work, but as you also always want to return the first datetime you could add an additional line using that same method like this:
The above returns and array of datetimes (even just 1 will still be in array) so lets grab the first element from it and pass it back to itself:
Now Here is an example of doing just that: https://gist.github.com/Pebblo/cb1a8a96a1cbf96fc68cedfeff0c76b0 Does that help? |
|
The support post ‘Add table view column to display the start date of the first datetime’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.