I want to build a layout where I show teasers of two different content type (A-B).
The teasers will be just images, where 1 teaser of content type A is the half in height of content type B and I would like to have for each row 3 columns.
So first and last columns with 2 teaser each of content type A and the center column with one teaser of content type B. 1A-1A -- 1B -- 1A-1A.
I used the following code in the views-view-unformatted.tpl.php to have the correct layout structure (probably I should have done this on template.php)
<?php foreach ($rows as $id => $row): ?>
<?php if($id % 5 == 0){ print '<div class="row">'; } ?>
<?php if($id % 5 == 2){ print '<div class="col-center">'; } ?>
<div class="<?php print $classes_array[$id]; ?>"><?php print $row; ?></div>
<?php if($id % 5 == 2){ print '</div>'; } ?>
<?php if($id % 5 == 4){ print '</div>'; } ?>
<?php endforeach; ?>
Now I get stuck on giving the order to the content type to display, so telling views that two first teasers have to be content type A, center one is content type B, last two content type A.
Here a screenshot of how should look like the layout, so maybe is easier to understand :) screenshot layout
Any suggestion will be appreciate! Thanks for reading