{# app/templates/platform/homepage-default.html #} {# Default platform homepage template with section-based rendering #} {% extends "platform/base.html" %} {# Import section partials #} {% from 'cms/platform/sections/_hero.html' import render_hero %} {% from 'cms/platform/sections/_products.html' import render_products %} {% from 'cms/platform/sections/_features.html' import render_features %} {% from 'cms/platform/sections/_pricing.html' import render_pricing with context %} {% from 'cms/platform/sections/_testimonials.html' import render_testimonials %} {% from 'cms/platform/sections/_gallery.html' import render_gallery %} {% from 'cms/platform/sections/_contact_info.html' import render_contact_info %} {% from 'cms/platform/sections/_cta.html' import render_cta %} {% block title %} {% if page %}{{ page.title }}{% else %}Home{% endif %} - {{ platform.name if platform else 'Multi-Store Marketplace' }} {% endblock %} {% block meta_description %} {% if page and page.meta_description %} {{ page.meta_description }} {% else %} Leading multi-store marketplace platform. Connect with thousands of stores and discover millions of products. {% endif %} {% endblock %} {% block content %} {# Set up language context #} {% set lang = request.state.language|default("fr") or (platform.default_language if platform else 'fr') %} {% set default_lang = platform.default_language if platform else 'fr' %} {# ═══════════════════════════════════════════════════════════════════════════ #} {# SECTION-BASED RENDERING (when page.sections is configured) #} {# ═══════════════════════════════════════════════════════════════════════════ #} {% if page and page.sections %} {# Hero Section #} {% if page.sections.hero %} {{ render_hero(page.sections.hero, lang, default_lang) }} {% endif %} {# Products Section #} {% if page.sections.products %} {{ render_products(page.sections.products, lang, default_lang) }} {% endif %} {# Features Section #} {% if page.sections.features %} {{ render_features(page.sections.features, lang, default_lang) }} {% endif %} {# Pricing Section #} {% if page.sections.pricing %} {{ render_pricing(page.sections.pricing, lang, default_lang, tiers) }} {% endif %} {# Testimonials Section #} {% if page.sections.testimonials %} {{ render_testimonials(page.sections.testimonials, lang, default_lang) }} {% endif %} {# Gallery Section #} {% if page.sections.gallery %} {{ render_gallery(page.sections.gallery, lang, default_lang) }} {% endif %} {# Contact Info Section #} {% if page.sections.contact_info %} {{ render_contact_info(page.sections.contact_info, lang, default_lang) }} {% endif %} {# CTA Section #} {% if page.sections.cta %} {{ render_cta(page.sections.cta, lang, default_lang) }} {% endif %} {% else %} {# ═══════════════════════════════════════════════════════════════════════════ #} {# PLACEHOLDER CONTENT (when sections not configured) #} {# ═══════════════════════════════════════════════════════════════════════════ #}

{{ _('homepage.placeholder.title') or 'Configure Your Homepage' }}

{{ _('homepage.placeholder.subtitle') or 'Use the admin panel to configure homepage sections with multi-language content.' }}

{{ _('homepage.placeholder.features_title') or 'Features Section' }}

{{ _('homepage.placeholder.features_subtitle') or 'Configure feature cards in the admin panel' }}

{% for i in range(3) %}

Feature {{ i + 1 }}

Configure this feature card

{% endfor %}

{{ _('homepage.placeholder.cta_title') or 'Call to Action' }}

{{ _('homepage.placeholder.cta_subtitle') or 'Configure CTA section in the admin panel' }}

Button 1 Button 2
{% endif %} {% endblock %}