M
M
maiskiykot2018-09-25 21:36:14
Drupal
maiskiykot, 2018-09-25 21:36:14

How to display data in a checkerboard pattern in Drupal?

The client asks to display the data in the following form:
picture - text
text - picture
picture - text
text - picture.
On naked puff, I would have done it in five minutes. How to implement this in Drupal with basic modules? Has anyone solved something like this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
archelon, 2018-09-25
@maiskiykot

Can be simply styled with css flexbox using the order property .
Display content (image-text) through views. By default, even-odd classes are added (even, odd)
Something like:

.views-row {
display:flex;
}
.views-row.even .image-field {
order:-1;
}
.views-row.odd .image-field {
order:1;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question