Sorry for the cryptic title, but could not find a better descriptive title. Suggestions welcome.
Situation: There is a newssite with on the frontpage two blocks:
1) a block of the latest 6 'promoted to frontpage' articles in form of an image caroussel
2) a block with the latest 12 newsheadlines, contains both 'promoted' as 'regular' articles
What should happen is:
- block one displays the latest 6 'promoted to frontpage' articles
- block 2 does not only contain older 'promoted to frontpage' articles, but also regular articles
- when an article shifts out of bock 1 it should shift towards block 2, assuming it is not older than the 12th article in this block
- there should be no overlap in articles between block 1 and 2, ie: the articles displayed in block 1 should not be displayed in block 2
Problem:
The problem is block 2. I can't figure out howto establish what I want without having an overlap between the two blocks.
The view of block 2 is pretty easy: select 12 nodes of the type 'article', order by date.
Question:
But how do I make sure that this selection takes out the first 6 promoted to frontpage articles? Offset 6 won't work, because then it might also skip regular articles. Only the promoted articles should be offsetted.
Is this feasible with some custom php code?
--- update ---
I think the most feasible solution would be either:
1) merge two views (one that selects the latest promoted articles with an offset of 6 and one that selects the latest regular articles together with some sort of union functionality and then limit it to 12
2) remove duplicates: so create a view that displays the latest 12 articles of any type, but which has been filtered in order to remove duplicates between the articles that are displayed in block 1
Haven't found a solution on either though...