I want to override the item listing template file core/themes/classy/templates/dataset/item-list.html.twig for listing the fields field_slider_images as well as field_blog_tags respectively of their's multiple values of the field.
I have selected "Unordered List" in the view.
Please do check the attached image.
I have created following files :
- item-list--field-blog-tags.html.twig
- item-list--field-slider-images.html.twig
But, this is not rendered for the listing of the fields.
When I have created item-list.html.twig then only it will access.
However, both fields have different data to style and I am not able to get the current field name which is loading it's data in item-list.html.twig.
function hook_node_view(array &$build, $entity, $display, $view_mode) { //add condition here if field exists or whatever, do the same for other field $build['field_slider_images']['#suggestion'] = 'field_slider_images'; }
then It is also applicable for both fields. For both fields, it have item-list--field_slider_images.tpl.php. Please help – Parag Kuhikar Dec 30 '16 at 07:56