Bonjour,

Je fais cette requête dans mon controlleur :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
$em = $this->getDoctrine()->getEntityManager();
 
        $media = $em->getRepository('AppMediaBundle:Media')->findByIdPoi($id);
j'ai mes résultats sur la vue :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<table class="records_list">
    <thead>
        <tr>
            <th>Id</th>
            <th>Title</th>
            <th>Type</th>
            <th>File</th>
            <th>Comment</th>
            <th>Partie</th>
        </tr>
    </thead>
    <tbody>
    {% for media in media %}
        <tr>
            <td>{{ media.id}}</td>
            <td>{{ media.title }}</td>
            <td>{{ media.type }}</td>
            <td>{{ media.file }}</td>
            <td>{{ media.comment }}</td>
            <td>{{ media.partie }}</td>
            <td>
 
    {% endfor %}
    </tbody>
</table>
J'ai un tableau qui affiche les résultats.

Maintenant je souhaite modifier l'affichage, je veux regrouper mes résultas suivant un même {{ media.partie }} !!
est ce possible sur Twig !!
Merci