1

The homepage on our local newswebsite "Zee-Online" has a view that shows al published content from the last week. How can i change this, to show at least a fixed number of items?

I want a view that gives me all the nodes from the last week OR at least 12 items (if the first filter-criteria doesn't result in at least 12 items)

2
  • items per page could set a maximum. You might have to use php for the 'or' condition.
    – GwenM
    Jun 13 '15 at 9:09
  • I don't want a maximum! If there are less then 12 items published in the last week, it should display older items to get the minimum of twelve.
    – Rian
    Jun 13 '15 at 10:33
1

Since you're trying to create a Views filter using an "OR" relationship, you might want to consider module Views Contextual Filters OR (which only has a dev version today). Excerpt from its project page:

... provides a views plugin which modify query to support OR conditions for contextual filters.

Does this help?

2
  • There's an OR relationship in the views module, but i can't configure a way to display the 12 most recent items. (and second clausule is OR published in the last week). Now i solved the problem using an Attachment in the view. We use the masonry views module on our page. It's almost what i want, but not perfect. The items in the attachment doesn't align with the masonry layout in the view.... (www.zee-online.be) (you can see where the attachment starts)
    – Rian
    Jun 15 '15 at 10:05
  • There's another problem: There are duplicate results in the page and attachment, but the query-settings => distinct doesn't solve the problem?
    – Rian
    Jun 15 '15 at 12:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.