CMS Development

Vchannel
Participant

Help Needed!

Hello devs, 

I have to create a scenario that is related to events.
We have to add events through the backend with event dates. Whenever that specific event date passes, it will disappear from the entire website.


In addition, every event will have a detail page, but once the event date passes the event detail will be converted into a past event detail page.

Could someone please help me to find the perfect solution?

0 Upvotes
Anton
Key Advisor | Diamond Partner
Key Advisor | Diamond Partner

Help Needed!

Hi @Vchannel

how did you created the events? With HubDB or "simple"/custom modules?

 

If you've done it with HubDB you can create seperate custom module like

{% set events = hubdb_table_rows('######') %}

{% for event in events %}
{% if unixtimestamp(local_dt) <= event['start_day'] %} {# 'start_day' is the name of the HubDB date column #}
show past events
{% else %}
If no events are shown
{% endif %}
{% endfor %}

 

 

hope this helps.

 

best, 

Anton

 




check
Did my post help answer your query? Help the Community by marking it as a solution



Vchannel
Participant

Help Needed!

Hey  @Anton,

Thanks for the solutions it really helped for me.

I hope you will be able to help me more.

Now I have 5 events in hubDB table then how can make dynamic page for each event and the page path is respectiive to event name. I checked for some solutions but I didn't get flow and syntax too.

0 Upvotes