src/FoundersBundle/Resources/views/Modules/posts.html.twig line 13

Open in your IDE?
  1. <div id="posts-container" class="site_tiles_wrapper">
  2.     {% for post in posts %}
  3.         {% if post.postType == postTypeSocialInvestment %}
  4.             <a href="{{ path('founders_investment_social_single', {category: post.category.url, url: post.url }) }}" class="site_tiles_box">
  5.                 <div class="tiles_img_wrapper">
  6.                     <img class="tiles_img" src="{{ sonata_path(post.getImagePreview(app.request.locale), 'big') }}" alt="{{ post.title }}">
  7.                     <span class="tiles_img_name">{{ post.getCategory }}</span>
  8.                 </div>
  9.                 <p class="tiles_data">{{ post.created|date("d.m.Y") }}</p>
  10.                 <p class="tiles_text">{{ post.title }}</p>
  11.             </a>
  12.         {% else %}
  13.             <a href="{{ path('founders_media_posts_single', {category: post.getCategoryUrlById, url: post.url }) }}" class="site_tiles_box">
  14.                 <div class="tiles_img_wrapper">
  15.                     <img class="tiles_img" src="{{ sonata_path(post.getImagePreview(app.request.locale), 'big') }}" alt="{{ post.title }}">
  16.                     <span class="tiles_img_name">{{ post.getCategoryTitleByTypeId }}</span>
  17.                 </div>
  18.                 <p class="tiles_data">{{ post.created|date("d.m.Y") }}</p>
  19.                 <p class="tiles_text">{{ post.title }}</p>
  20.             </a>
  21.         {% endif %}
  22.     {% endfor %}
  23. </div>