0

We have an Article content type. The content type has a boolean field called "Featured".

We have two views setup:

  1. The featured article view. This is limited to the most recent article with the "Featured" boolean checked (limit 1, sort by date).
  2. The recent articles view. This shows all the recent articles on the site.

The problem is we don't want the most recent "Featured" article to display in the recent articles view. But we also want other "Featured" articles to display if they aren't the most recent.

I can't find an easy way to achieve this as we are only allowed to filter out ALL featured articles or none, and not just the first one.

1 Answer 1

1

The easiest and fastest way I can think of is to use an offset in your pager.

If the most recent featured article is to be skipped, ensure that the list does not start with the first, but with the second result. You can do this for any pager, or even with a fixed amount of items to display.

Screenshot of offset option

Alternatively, but that is easier with a node and a view, you might be able to use a contextual filter to suppress a Content ID from a views listing. I have used to populate a sidebar view with all recent articles except the viewed one.

In your situation it might be an issue getting the Content ID from one view to another though Exclude content ID

1
  • Yea I've thought about using the offset ability in the pager to remove the first item, but I haven't been able to figure out how to force the most recent article to be the first item without prioritizing all featured articles in the sort order.
    – joegl
    Commented Mar 23, 2021 at 20:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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