Recipe - Countdown to Next Online Service
Skill level: Intermediate
Organization: Moving Communities to Christ
{# strip images & classes from the HTML but otherwise leave structure #}
Are you using LifeChurch's Online Church Platform? They offer a great countdown widget that you can access and add to your webpage, but unfortunately, it doesn't work on a Rock powered website (at least not for me).
Desiring to have the countdown we rocked there code.
To add the countdown to your Rock site:
- Add a new HTML block to the page you desire the countdown on.
- Inside the block settings allow "webrequests".
- Enter the HTML below updating everywhere that says "[YOUR Church Online URL]" to your church's unique URL.
- Celebrate.
{% webrequest url:'[YOUR Church Online URL]/api/v1/events/current' %}
{% for item in results %}
{% capture isLive %} {{ item.response.item.isLive }} {% endcapture %}
{% capture eventStartTime %}{{ item.response.item.eventStartTime }}{% endcapture %}
{% endfor %}
{% endwebrequest %}
{% if isLive == 'true' %}
Watch our live stream now: Join
{% elseif isLive contains 'false' %}
Our next live stream is in:
{% endif %}
Screenshots
- /GetImage.ashx?guid=d9b2f1f6-1928-4859-8176-0a38a895228e