diff --git a/mandelstudio/settings/base.py b/mandelstudio/settings/base.py index a2d6df2..9b00ab7 100644 --- a/mandelstudio/settings/base.py +++ b/mandelstudio/settings/base.py @@ -23,6 +23,14 @@ setup_search_paths("/etc/ocyan/", str(_project_app_path)) from ocyan.main.settings import * # noqa: I001 # pylint:disable=W0401,W0614 from ocyan.core.fender import config as ocyan_config # noqa: I001 +# Ensure repo-level template overrides are picked up in every environment +# (staging/prod often deploy the project as a checkout rather than a wheel). +_project_templates_dir = str(BASE_PATH / "templates") +if "TEMPLATES" in globals() and TEMPLATES and isinstance(TEMPLATES[0], dict): + TEMPLATES[0].setdefault("DIRS", []) + if _project_templates_dir not in TEMPLATES[0]["DIRS"]: + TEMPLATES[0]["DIRS"].insert(0, _project_templates_dir) + INSTALLED_APPS = [ "mandelblog_content_guard.apps.MandelblogContentGuardConfig", "mandelstudio", diff --git a/templates/carbasa/headers/header.html b/templates/carbasa/headers/header.html new file mode 100644 index 0000000..b2d88bb --- /dev/null +++ b/templates/carbasa/headers/header.html @@ -0,0 +1,74 @@ +{% load i18n oxyan category_tags ocyan_main ocyanjson wagtailsettings_tags %} + +{% get_settings %} +{% if settings.ocyan_plugin_wagtail.OcyanSettings.promo_header %} +
+
+
+ {% for block in settings.ocyan_plugin_wagtail.OcyanSettings.promo_header %} + {% if block.block_type == "TextSlider" %} +
+
+
    + {% for slide in block.value %} + {% block textslide %} +
  • {{ slide.text }}
  • + {% endblock %} + {% endfor %} +
+
+
+ {% else %} +
+ {{ block }} +
+ {% endif %} + {% endfor %} +
+
+
+{% endif %} + +
+ {% include "oscar/partials/alert_messages.html" with messages=messages %} +
+ +{% get_oxyan_definition "header" as header_class %} +
+ + {% block extra_nav %}{% endblock %} +
+ +{% include "partials/search_modal.html" %} +