ビューをフィールドごとに印刷して、スタイルを適用して外観をカスタマイズできるようにしようとしています。
views-view-unformatted--MY-TEMPLATE.html.twig をコピーすると、デフォルト ビューでこれらの変数を確認できます。
{#
/**
* @file
* Default theme implementation to display a view of unformatted rows.
*
* Available variables:
* - title: The title of this group of rows. May be empty.
* - rows: A list of the view's row items.
* - attributes: The row's HTML attributes.
* - content: The row's content.
* - view: The view object.
* - default_row_class: A flag indicating whether default classes should be
* used on rows.
*
* @see template_preprocess_views_view_unformatted()
*
* @ingroup themeable
*/
#}
{{ kint(content) }} を使用した後、show のように _entity フィールドがあることがわかります
ただし、これらの特定のフィールドを出力する方法や、Kint を使用してそれらを分離する方法を見つける方法さえわかりません。私は次のようなことを試みました:
{{ kint(content._entity) }}
役に立たず、それを印刷しようとする他の方法がたくさんあります。
どんな助けでも大歓迎です!