I have created a Views' block template override. Have tested and debugged it and it works.
I mean it is loaded successfully. I have a confusion though about how to loop
through records.
In Views version of Drupal 7 it was easy to get everything loop. But in Drupal 8 due to its advancement in terms of template and Entity expansion, it need some bit of more knowledge.
When I do the following, the records get printed:
<?php
{% for row in rows %}
{{ row.content }}
{% endfor %}
?>
Though I want to have full access to each individual field, and print them as I like:
<?php
// for example
{% for row in rows %}
{{ row.node_title }}
{% endfor %}
?>
Am I obliged to use preprocessor function? Isn't there a ready to use array which yet has not been processed into row.content?
Thanks in advance
Comments
did you figure it out?
I hate stumbling onto threads like this that never got a response. I've encountered the same thing, and wondering if you ever figured out how to accomplish this?