Quantcast
Channel: Glassdimly Tech Blog: Planet Drupal
Browsing latest articles
Browse All 18 View Live

Drupal 8: How to Get Image Style Tokens for Metatags

It turns out that image style tokens are an easter egg of the regular Token module, ported in from the Imagecache Token module on this ticket.Image style tokens don't show up in the media browser, and...

View Article



8: Programatically Filter Current Nid from Views Block Listing

Views has a setting to exclude the current nid from the URL from the listing one is currently viewing. This is essential when you have, say, a list of related nodes that are are defined by a category...

View Article

8: Disable Caption on Specific Entity Embed Types in CkEditor

I had a devil of a time figuring out where captioning was coming from on my entity embeds.Another team member had set it up, and I was just kind of baffled as to why captions were being offered on my...

View Article

Drupal 8.3: Create Programmatic Custom Breadrumb

On the method of creating custom breadcrumbs: simply crumble stale bread and dip battered eggs into your bowl. But in Drupal.

View Article

D8: Disable Block Programmatically on Just One View or Node

On the method of disabling a block without recourse to path.

View Article


D8: Variables in template_preprocess_views_view not passed to twig

I had a very strange problem wherein I was not able to affect variables being passed to views-view-grid--my_view.html.twig.

View Article

Drupal ES6 Linting in PhpStorm. Or, PhpStorm Drupal Error: Cannot find module...

You may not know this, but support for ES6 was added in Drupal 8.4. It wasn't in the release notes, but I was delighted to learn of it.You have probably landed here because you have gotten Error:...

View Article

Overriding Drupal 8's .eslintrc.json File in Your Theme With Extends

I had to do a little RTFMing today, and so I thought I'd post about it.First of all, this is how you set up PhpStorm to use ES6 eslint settings. You may find it usefulIs the linter getting in your way?...

View Article


Srcset Example and Explanation in Static HTML

There're a lot of really complicated descriptions of srcset out there.As a result, I thought srcset was more complicated than it actually is.Here's the all-purpose srcset code I used in my static HTML....

View Article


Drupal srcset in static HTML pages: gulp asset build pipeline

Client has a bunch of static landing pages that are mobile-friendly and need to remain that way.But what is to be done about srcset? Read on, oh reader, for the solution.First, I created a gulp build...

View Article
Browsing latest articles
Browse All 18 View Live




Latest Images