radishlab Posted November 25, 2020 Share Posted November 25, 2020 Site URL: https://www.red.org/blog-2 On a custom collection page: https://www.red.org/blog-2 (password: test), I have the following snippet: <div class="b-slider"> {.repeated section items} <div class="b-slider-slide"> <a class="b-slider-link" href="{fullUrl}"> <div class="b-slider-img-wrapper content-fill"> <img class="b-slider-img" {@|image-meta} /> </div> <div class="b-slider-text"> <div class="b-slider-text-inner"> {.section categories} <h6 class="b-slider-article-category">{.repeated section @}{@}{.alternates with}, {.end}</h6> {.end} <h1 class="b-slider-article-title">{title}</h1> {.if updatedOn} <h6 class="b-slider-article-date">{updatedOn|date %B %e, %Y}</h6> {.or} <h6 class="b-slider-article-date">{addedOn|date %B %e, %Y}</h6> {.end} </div> </div> <div class="b-slider-overlay"></div> </a> </div> {.end} </div> Which displays all items in the collection. How can I limit which posts display to only those with a specific tag of "popular". If I do something like this: {.repeated section categories} {.equal? @ "popular"} markup goes here {.end} {.end} That seems to narrow the scope which prevents me from displaying the item's title, image, date, etc. Any ideas? /Chris Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.