templates/blog/article.html.twig line 1

Open in your IDE?
  1. {% extends 'document.html.twig' %}
  2. {% block main_content %}
  3.   
  4.   <section class="section-padding">
  5.     <div class="container">
  6.       <div class="blog-articles">
  7.         <div class="article">
  8.         {% if article is not null %}          
  9.           <h1 class="article-header">{{ article.getHeadline | raw }}</h1>
  10.           <div class="article-content">
  11.             {{ article.getArticle | raw }}
  12.           </div>
  13.           {% if article.getCategories | length > 0 %}
  14.           <div class="article-meta">
  15.             <span>{{ 'news-this-post-is-published-in' | trans }}        
  16.             {% for category in article.getCategories %}         
  17.               {% if loop.index > 1 %}, {% endif %}
  18.               <a class="meta-link" href="{{ locale ~ blog.blogPathPrefix }}/category/{{ category.getKey }}">{{ category.getName }}</a>   
  19.             {% endfor %}
  20.             {% if article.getDate %}
  21.             {{ 'news-publication-date' | trans }} {{ article.getDate.locale(locale).format('d. F Y') }}.</span>
  22.             {% endif %}
  23.           </div> 
  24.           {% endif %}  
  25.         {% else %}      
  26.           <h3>{{ 'news-requested-article-not-found' | trans }}</h3>           
  27.         {% endif %}
  28.         </div>
  29.       </div>
  30.       
  31.       <div class="blog-article-options">
  32.         <div class="article-navigation">
  33.           <div class="row">
  34.             <div class="col-12 col-lg-6 text-start">
  35.               {% if prevArticle.key is defined %}
  36.               <a class="article-link prev-article" href="{{ prevArticle.getKey }}"><span class="lsf">left</span>&nbsp; {{ prevArticle.getHeadline }}</a>
  37.               {% endif %}
  38.             </div>
  39.             <div class="col-12 col-lg-6 text-end">
  40.               {% if nextArticle.key is defined %}
  41.               <a class="article-link next-article" href="{{ nextArticle.getKey }}">{{ nextArticle.getHeadline }} &nbsp;<span class="lsf">right</span></a>
  42.               {% endif %}
  43.             </div>
  44.           </div>
  45.         </div>
  46.       </div>
  47.     </div>
  48.   </section>
  49. {% endblock %}