Skip to Content
Design and Prototyping for Drupal
book

Design and Prototyping for Drupal

by Dani Nordin
December 2011
Intermediate to advanced
170 pages
3h 50m
English
O'Reilly Media, Inc.
Content preview from Design and Prototyping for Drupal

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.

Contextual Filter settings for our “Related Events” view

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.

Oh, look! There’s also a Sausage Sunday happening. Neat!

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

Our Event page, with theming applied. Isn’t that better?

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

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Drupal 8 Module Development - Second Edition

Drupal 8 Module Development - Second Edition

Daniel Sipos
Using Drupal, 2nd Edition

Using Drupal, 2nd Edition

Angela Byron, Addison Berry, Bruno De Bondt

Publisher Resources

ISBN: 9781449311391Errata PagePurchase book