diff --git a/doc/development/api/general.rst b/doc/development/api/general.rst index 3eea3da59..193421d64 100644 --- a/doc/development/api/general.rst +++ b/doc/development/api/general.rst @@ -25,7 +25,7 @@ Frontend -------- .. automodule:: pretix.presale.signals - :members: html_head, footer_links + :members: html_head, footer_links, front_page_top, front_page_bottom .. automodule:: pretix.presale.signals diff --git a/src/pretix/presale/signals.py b/src/pretix/presale/signals.py index fd9325e4c..9ae39cdd2 100644 --- a/src/pretix/presale/signals.py +++ b/src/pretix/presale/signals.py @@ -78,3 +78,25 @@ easy to cause serious performance problems. As with all plugin signals, the ``sender`` keyword argument will contain the event. """ + +front_page_top = EventPluginSignal( + providing_args=[] +) +""" +This signal is sent out to display additional information on the frontpage above the list +of products and but below a custom frontpage text. + +As with all plugin signals, the ``sender`` keyword argument will contain the event. The +receivers are expected to return HTML. +""" + +front_page_bottom = EventPluginSignal( + providing_args=[] +) +""" +This signal is sent out to display additional information on the frontpage below the list +of products. + +As with all plugin signals, the ``sender`` keyword argument will contain the event. The +receivers are expected to return HTML. +""" diff --git a/src/pretix/presale/templates/pretixpresale/event/index.html b/src/pretix/presale/templates/pretixpresale/event/index.html index 44c5a7f16..911d828ca 100644 --- a/src/pretix/presale/templates/pretixpresale/event/index.html +++ b/src/pretix/presale/templates/pretixpresale/event/index.html @@ -3,6 +3,7 @@ {% load l10n %} {% load eventurl %} {% load thumbnail %} +{% load eventsignal %} {% load markup_tags %} {% block title %}{% trans "Presale" %}{% endblock %} @@ -55,6 +56,7 @@ {% if frontpage_text %} {{ frontpage_text|apply_markup:"markdown"|linebreaks }} {% endif %} + {% eventsignal event "pretix.presale.signals.front_page_top" %} {% if event.presale_is_running or event.settings.show_items_outside_presale_period %}
{% endif %} {% if vouchers_exist %} -