Drupal 8

Get File URI from Media Entity Reference Item in Drupal 8 OR Wrong File Loaded

Another day learning Drupal 8, but today is troubling.

Here's where I'm at. I'm theming search results, and I need to load field values to pass to twig templates—specifically a styled url for img src.

Entities values are not loaded on search results, only little snippets, so I have to load them the hard way, because we want images and nice theming on our search results.

Config Management Roundup

Quite the problem—Drupal config management on local and prod.

Drupal 8 can be punctilious: it will simply refuse to work if there's a mismatch between database and config objects on the filesystem.

So... how do we manage two sets of configurations—one for local, and one for production?

The Problem

I have modules like varnish installed on production that shouldn't be enabled on local, and modules that are enabled on local that shouldn't be enabled on production.

Responsive iframe in Drupal 8 from Client Embed Code

Nobody likes iframes. That's because you can't style their innards, and they aren't responsive... or are they?!?!

The first thing to know about here is the padding height hack. This allows you to set the height of an object relative to the width, because while height is always as a percentage of the container, padding height is as a percentage of width. So all you have to know is the ratio of height to width and you can make a thing that responsively scales.

Pages

Subscribe to Drupal 8