I need to theme the first row of a view page with a different image size and the theme debug suggested me:
This is new on drupal 8.
I was wondering if is possible to get template suggestions per row number.
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.Sign up to join this community
This is probably not a simple task for a template name suggestion, because at the time of rendering the node is unaware of where it is placed in the view.
So a better approach might be to use two different view modes, one for the first and one for the rest of the nodes. Then use a row style plugin to switch the view modes, for example the module Views Parity Row.
If this is only to apply CSS, then don't try to add row classes to the node. Add them to the views row container and target elements inside of the node with multiple CSS selectors.