La fonction de suggestion automatique permet d'affiner rapidement votre recherche en suggérant des correspondances possibles au fur et à mesure de la frappe.
Rather than filtering by date in your for loop, it is better to filter the query itself
{% set queryparam = "&orderBy=start_date" %} {% set queryparam = queryparam + "&event_start_date__gt=" + local_dt|unixtimestamp %} {% set table = hubdb_table_rows(XXXXXX, queryparam) %}
This helps in scenarios where you might only want to show a limited # of results >= today's date -- say a list of the next 3 upcoming on your homepage, not ALL upcoming.
Rather than filtering by date in your for loop, it is better to filter the query itself
{% set queryparam = "&orderBy=start_date" %} {% set queryparam = queryparam + "&event_start_date__gt=" + local_dt|unixtimestamp %} {% set table = hubdb_table_rows(XXXXXX, queryparam) %}
This helps in scenarios where you might only want to show a limited # of results >= today's date -- say a list of the next 3 upcoming on your homepage, not ALL upcoming.
Hi @jasonvanpelt, so i tried the cod and it works perfectkly. However i am not able to show the events for the next 30 days. How can i add that? Thanks in advance.
This solution work perfect when we use '%j' in a timestamp but the thing is this condition doesnot show up the events for next year. I mean this condition only shows the events till Dec 31, 2020. If we set the event date for Jan 01, 2021 then, the events are not being displayed in the site. I suppose you get what's the issue I mean.
It would be really a great help if there is any solutions regarding the issue. Thanks in advance!
@giozua - It appears that string of code works if the event dates are within the same year (ex. past 2018 events don't show up), but any events with dates in the year 2017 are showing up in the listing (and shouldn't be). Any idea how to get around this or why this is happening?
This is my string of code...
{% if (row['event_date_start']|datetimeformat('%j'))>=(local_dt|datetimeformat('%j'))%}
I want to see if other HubDB users are experiencing this issue @Jlamb1 and @stefan are you experiencing the same thing? Do you have any tips for @leckerman?
@jennysowyrda - I was able to find help in the HubSpot slack group on Friday. Key was to add "&datetime_column__gt=0s" to the query and not use an if statement. Hope that can help someone else!