• Development

    Link to a View (with Contextual Filter value) If It Will Have Results (Drupal 8)

    Returns a link render array.

  • Development

    Drupal Views – Show One (Most Recent) Item Per Group

    Alright, the title is a bit misleading because I’m not using Groups, but it is the best explanation of what I’m achieving with this example. My goal is to show a list of the most recent blog post in each category, where clicking the category takes you to the associated post.

    I have a content type called Blog Post which has the following fields:

    • Date (field_blog_date – date field – single value)
    • Category (field_blog_tr_category – taxonomy reference field – single value)
    • Items (field_blog_cr_items – content reference field – unlimited values)