mazze's picture

Hi, is there any way to achieve this modules behaviour in Backdrop CMS, maybe in views.tpl.php...? Or would porting the module be a big issue?

https://www.drupal.org/project/views_parity_row

I need having a list of teasers, with image align left (1,3,5,7) or right (2,4,6,8)

 

Most helpful answers

Could you not do this with CSS using Views' odd/even classes...?

Comments

Could you not do this with CSS using Views' odd/even classes...?

mazze's picture

I must use entity view mode, not field mode in Views

Here's a test view I just setup of nodes (not fields):

And here's the HTML it outputs by default:

So you can definitely use node/entity view modes in Views and it'll still output odd/even classes for the rows.

mazze's picture

Thank you @BWPanda... I could re-create this. But what I need is

  • line 1 shows content using teaser-template-left.tpl.php
  • line 2 shows content using teaser-template-right.tpl.php

I can't solve the problem using one template and some CSS (might work for simpler cases)