Step 7: Setting Up the “Related Events” Block
Now that I have the host info block set up, it’s easy enough to create a “related events” view and place the block it creates. The process was remarkably similar to what I did with the host information, with the following exceptions:
Instead of configuring our contextual filters by the node ID, we’re using the Taxonomy term, from the Event Categories vocabulary
Since this is just pulling fields from the Event content type, we don’t need to worry about relationships
Figure 12-30 shows how that contextual filter was set up.

Figure 12-30. Contextual Filter settings for our “Related Events” view
Now, if I go back to my Blocks administration screen (Structure→Blocks) and enable the Related Events block using the same configuration as I did with the About the Host block, I should see a selection of related workshops available for theming (see Figure 12-31).
From here, it’s easy to start theming this whole thing so it looks a bit closer to our design. After a bit of CSS love, and a bit of Drupal tweaking, here’s our updated page in Figure 12-32.

Figure 12-31. Oh, look! There’s also a Sausage Sunday happening. Neat!

Figure 12-32. Our Event page, with theming ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access