December 2018
Beginner to intermediate
404 pages
10h 14m
English
The last column of our report will feature the list of authors with their avatars. We will loop through the followers to render each one of them, and use the Bootstrap media object:
<!-- Render authors-->
<ul class="list-unstyled">
<t t-foreach="o.author_ids" t-as="author"> <li class="media>
<span t-field="author.image_small" t-options="{'widget': 'image'}" />
<div class="media-body"> <p class="mt-0"> <span t-field="author.name" /> </p>
</div>
</li> </t>
</ul>
Here, we are looping through the author_ids, and for each author rendering the image using a field image widget, <t t-field="..." t-options="{'widget': 'image'}", and the author's name.
Read now
Unlock full access