{% if articles %}
  <div class="panel panel-default sub-articles">
    <div class="panel-heading">
      <h3 class="panel-title">推荐资讯</h3>
    </div>
    <div class="panel-body">
      <ul class="media-list">
        {% for key,article in articles %}
          <li class="media">
            <span class="rank_num">{{ key+1 }}</span>
            <div class="media-body"><a href="{{ path('article_detail', { id:article.id }) }}" title="{{ article.title }}">{{ article.title|plain_text(19) }}</a></div>
          </li>
        {% endfor %}
      </ul>
    </div>
  </div>
{% endif %}