Recently, I needed to add some dynamic content to a Views footer. Specifically, I needed to change a link in the Views footer based on the current path, which isn’t an option from the Views UI. I found some good documentation showing how this can be done in older versions of Drupal (https://www.drupal.org/node/749452), but nothing for Drupal 8. I figured the approach must be similar in Drupal 8 so I started searching and reverse engineering.
Posts in Drupal Planet
In case you've had trouble tracking it down (I did), the approach to caching custom blocks is different in Drupal 8 than in Drupal 7. In Drupal 8 all renderable arrays are cacheable – including, of course, those returned by custom blocks.
Our client, Human Rights Watch, publishes a large volume of content and with the redevelopment of HRW.org, they wanted a way to curate their content in more meaningful ways. One way we did this was by showing what content is shared most frequently across a variety of social networks.
Human Rights Watch (HRW) has been sharing important stories for over 30 years and we were excited about enhancing the digital story-telling experience in the latest relaunch of HRW.org. Out-of-the-box, Drupal provided a great platform for us to craft tools that matched HRW’s internal publishing workflows, while allowing their publishers to create long-form content with videos, galleries and other rich content.
A technical architecture document is not only helpful for planning, but can also be used to automate the creation of content types and other site elements. This cuts down on development time, allowing for rapid prototyping. This process plays well into a content first approach to web development and helps the client understand the power of structured content.
As information architects, we love tools that help clients think about the structure of their content. One which we’ve found particularly helpful is what we call our Technical Architecture document. It’s a spreadsheet that defines the structure of the site. This approach is not uncommon, especially within the Drupal community; however, we have promoted this spreadsheet from information architecture tool to site generator. By automating a once manual process, we’ve introduced some really exciting opportunities around rapid prototyping and efficient product iteration.
Recently we had the task of loading data from a content type with 350 fields. The overhead of the Views module caused PHP timeouts when exporting all the nodes. Loading an entire node means JOINing the node table by entity_id with each related field table, and at 350 fields the query runs slow.
Just a couple months ago the title of this post would have sounded crazy to me. For the last several months I've been working on the CINC module as a way to make my work (and yours) with Drupal configuration better: faster, more predictable, more flexible, etc.
For cause-driven organizations, a website is a place to highlight impact, share resources, and build support. While a blog or brochure site can achieve some of these goals, it rarely does it all. Unfortunately, we all too often find organizations confined by the free and low-cost online platforms accessible to them. With that in mind, we’ve built OpenAid. It’s a free and open-source website starter kit developed for nonprofits and grassroots organizations. Its feature set is robust, its architecture flexible, and it can be installed in minutes.
A while ago I made a tool named Sheet2Module, which uses the Config in Code (CINC) module to allow Drupal site builders to make content types and fields directly from Google Spreadsheets. This made a lot of people interested in CINC, but I've found much of that interest was based on a misconception that CINC is focused on spreadsheets.