Tutorials

Getting the parent node of a Drupal 8 node

There are some circumstances that you want to get data from the node one level up a menu from your current node. However, doing that is not self-explanatory since there isn't actually any direct relationship between the nodes.I'll be referring to the nodes as "parent" and "child" for simplicity despite this.

Setting up the brotli extension for PHP

The Brotli extension for PHP, integrates the Brotli compression algorithm for use in PHP. Brotli compression is similar to gzip but has a higher compression ratio - up to 30% bandwidth savings. However, it does have a slight drawback; it is slower. This can be worked around most effectively by pre-compressing resources before the web server needs them. Hence with a LAMP stack, using the Brotli PHP extension provides easy performance gains.

Including Patches in Drupal Contrib Modules

Very occasionally in building a Drupal module (especially for 7.x), you can't actually quite do what you want to do without a change to another module or core. Every effort should be made to avoid that but there are instances that it is truly required and the right method. If on your own site it is pretty easy to document, commit to version control etc - still questionable but doable. However if it is for a public module, it has been problematic at best but there is a way to reduce the pain.