Something went wrong. Try again.
Element Exporter makes exporting data from your Craft CMS website easy and repeatable, with events for custom data parsing and elements.
Something went wrong. Try again.
1.3 kB · 29 lines
at develop
123456789101112131415161718192021222324252627282930{% set export = exportId ? craft.exports.id(exportId).one() : create('studioespresso\\exporter\\elements\\ExportElement') %}
{# Refreshes the component every 5 seconds #}{% set timezone = timezone ?? 'Europe/Brussels' %}
<div sprig s-trigger="every 5s" class="pulse"> {% set isRunning = craft.exporter.listenForJob(export) %} {% if isRunning %} <h2>{{ "⏳Your export running, stay tuned"|t("exporter") }}</h2> <p> Depending on number of entries in your export, this could take a while... </p> {% else %} <h2>{{ "✅ Done!"|t("exporter") }}</h2> {{ "Your export has finished and has sent by e-mail." }}{# <div>#}{# Done! Click the button below to download your export!#}{# <form method="post">#}{# {{ csrfInput() }}#}{# {{ actionInput('exporter/element/get-download') }}#}{# {{ hiddenInput('exportId', export.id) }}#}{# {{ hiddenInput('fileName', craft.app.request.getQueryParam('fileName')) }}#}{# <button type="submit" class="btn submit">{{ 'Download file' }}</button>#}{# </form>#}{# </div>#} {% endif %} <hr> {{ "View last updated at:"|t("exporter") }} {{ now|time('long', timezone=timezone) }}</div>