21 lines
743 B
Twig
21 lines
743 B
Twig
{% if entity.image %}
|
|
{% set image = asset(entity.image.pathname) %}
|
|
{% else %}
|
|
{% set image = asset('build/images/no-image.png') %}
|
|
{% endif %}
|
|
|
|
<img src="{{ asset('build/images/blank.png') }}" style="background: url({{ image }}) center center; background-size: cover" class="rounded float-left mr-2">
|
|
|
|
<a href="{{ path('admin_blog_post_show', {entity: entity.id}) }}" class="font-weight-bold text-body d-block">
|
|
{{ entity.title }}
|
|
</a>
|
|
|
|
{% set categories = [] %}
|
|
|
|
{% for category in entity.categories %}
|
|
{% set url = path('admin_blog_category_show', {entity: category.id}) %}
|
|
{% set categories = categories|merge(['<a href="' ~ url ~ '">' ~ category.title ~ '</a>']) %}
|
|
{% endfor %}
|
|
|
|
Dans {{ categories|join(', ')|raw }}
|