{# ProjectDetail "Le projet" info block - top-level content field group (NOT a `blocks[]` entry, see decision (a) in spec-driven-development/project-detail-redesign.md: always exactly one instance, directly under the hero, never reordered/duplicated). Parameters: - content (object): page content, reads `content.{projectInfoTitle, projectInfoText, projectInfoItems[]}` (`projectInfoItems[]` = `{label, value}[]`, arbitrary count) - editMode (bool) Right column is RepeatableObjectListEditor-managed in edit mode (assets/admin/editor/ RepeatableObjectListEditor.ts, instantiated page-level for `#project-detail-info-items` in assets/admin/editor/index.ts) - `data-field="projectInfoItems[N][label]"` / `[value]` per item, index-contiguous (add/remove/drag-reorder reindexes items). Items are reordered by dragging their `data-repeatable-item-handle` handle. #} {% set items = content.projectInfoItems|default([]) %}

{{ content.projectInfoTitle|default('Le projet') }}

{% if (content.projectInfoText is defined and content.projectInfoText) or editMode|default(false) %}
{{ content.projectInfoText|default('')|raw }}
{% endif %}
{% for item in items %} {# Public render hides items left without value (e.g. untouched creation defaults); edit mode keeps them so index-contiguous `data-field`s stay intact. #} {% if editMode|default(false) or item.value|default('')|trim is not empty %}
{{ item.label }}
{{ item.value }}
{% if editMode|default(false) %} ⋮⋮ {% endif %}
{% endif %} {% endfor %}
{% if editMode|default(false) %} {# Hidden single-item template, cloned by RepeatableObjectListEditor.ts when "Ajouter un item" is clicked - keeps editor markup in sync with the real render partial ("clone real markup" rule, same as the gallery block's single-image-slot template). Index placeholder `__INDEX__` is rewritten to the real trailing index on insertion. #} {% endif %}