wisski_content_types-1.0.1/templates/nodes/node--col-md-4.html.twig

templates/nodes/node--col-md-4.html.twig
{%
  set classes = [
    'node',
    'node--type-' ~ node.bundle|clean_class,
    node.isPromoted() ? 'node--promoted',
    node.isSticky() ? 'node--sticky',
    not node.isPublished() ? 'node--unpublished',
    view_mode ? 'node--view-mode-' ~ view_mode|clean_class,
    'clearfix',
    'col-md-4',
    'col-sm-12',
    'col-xs-12',
  ]
%}
{{ attach_library('classy/node') }}
<article{{ attributes.addClass(classes) }}>
 <div class="panel">
  <div class="panel-body">
    <header>
      {{ title_prefix }}
      {% if not page %}
        <h2{{ title_attributes.addClass('node__title') }}>
          {{ label }}
        </h2>
      {% endif %}
      {{ title_suffix }}
      {% if display_submitted %}
        <div class="node__meta">
          {{ author_picture }}
          <span{{ author_attributes }}>
            {% trans %}Submitted by {{ author_name }} on {{ date }}{% endtrans %}
          </span>
          {{ metadata }}
        </div>
      {% endif %}
    </header>
    <div{{ content_attributes.addClass('node__content', 'clearfix') }}>
      {{ content.field_image }}
      {{ content.body }}
    </div>
  </div>
  <div class="panel-footer">
  {% if content.field_col_md_4_url.0['#url'] %}
     <a href="{{ content.field_col_md_4_url.0['#url'] }}" title="{{ content.field_col_md_4_url.0['#title'] }}">{{ node.field_col_md_4_url_name.value|t }}</a>
  {% endif %}
  </div>
 </div>
</article>

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc