[Python] TAL title attribute of repeat object gets id instead of title

Discussão em 'Python' iniciado por Stack, Março 5, 2025.

  1. Stack

    Stack Membro Participativo

    In the following TAL repeat loop, the ids of the repeated objects are rendered instead of the titles. Why is that and how can I get the title of the object?

    <div class="row row-cols-2" tal:repeat="article container/articles">
    <div class="col card m-4 p-0" style="height: 18rem; width: 18rem;">
    <div class="card-header">
    Header
    </div>
    <div class="card-body">
    <h5 class="card-title" tal:content="article/title"></h5>
    <p class="card-text">Some text.</p>
    <a href="#" class="btn btn-primary">Go somewhere</a>
    </div>
    </div>
    </div>

    Continue reading...

Compartilhe esta Página