Replies: 4 comments 4 replies
-
When you're looping through, you could just check if it's highlighted? {{ collection:nieuws paginate="20" as="news" }}
{{ if highlighted === false }}
<!-- News card -->
{{ /if }}
{{ /collection:nieuws }} |
Beta Was this translation helpful? Give feedback.
-
Thanks, this would exclude all highlighted items. Ideally only the latest highlighted item isn't included. The older highlighted items should be added to the blog overview. |
Beta Was this translation helpful? Give feedback.
-
Random idea, I think if you are using the new antlers parser you could store the id of the latest, highlighted entry at the top of the file and then exclude that one from your second loop I think. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm currently working on a news section. A news item can be 'highlighted' or not. When an article is highlighted, the newest one will be shown at the top of the page and will be bigger than the regular items. Older highlighted item, it will show just like the regular items in a blog overview.
I'm using the following code to get the latest highlighted item:
{{ collection:nieuws highlighted:is="true" limit="1" sort="date:asc" as="news" }}
I'm building the regular blog posts with the code below:
{{ collection:nieuws paginate="20" as="news" }}
When I use the code above the latest highlighted item will be shown twice on the page (once as highlighted item and once in the regular blog overview). How can I make sure that the latest highlighted item doesn't show up in the regular blog posts overview?
Beta Was this translation helpful? Give feedback.
All reactions