fix(cms): testimonials dict.items() collision in section macro
testimonials.items in Jinja2 calls dict.items() method instead of
accessing the 'items' key when sections are raw JSON dicts (POC builder
pages). Fixed by using .get('items', []) with mapping check.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -20,10 +20,11 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{# Testimonial cards #}
|
{# Testimonial cards — use .get() to avoid dict.items() method collision with JSON dicts #}
|
||||||
{% if testimonials.items %}
|
{% set testimonial_items = testimonials.get('items', []) if testimonials is mapping else [] %}
|
||||||
|
{% if testimonial_items %}
|
||||||
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
|
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
|
||||||
{% for item in testimonials.items %}
|
{% for item in testimonial_items %}
|
||||||
<div class="bg-white dark:bg-gray-800 rounded-xl p-8 shadow-sm border border-gray-100 dark:border-gray-700">
|
<div class="bg-white dark:bg-gray-800 rounded-xl p-8 shadow-sm border border-gray-100 dark:border-gray-700">
|
||||||
<div class="flex items-center mb-4">
|
<div class="flex items-center mb-4">
|
||||||
<div class="flex text-yellow-400">
|
<div class="flex text-yellow-400">
|
||||||
|
|||||||
Reference in New Issue
Block a user