This assumes you are using a Drupal 8 or Drupal 9 recipe and Mac OS. Also, xdebug 3.x is assumed, which is standard for Lando-provided PHP image.
Example .lando.yml
file can look like this:
name: xdebug-test
recipe: drupal8
config:
webroot: web
<?php | |
use Drupal\paragraphs\Entity\Paragraph; | |
/** | |
* Implements template_preprocess_node | |
* | |
* Add variables for paragraphs available to node templates | |
*/ | |
function CUSTOM_preprocess_node(&$variables) { | |
// Convenience Variables |
/* | |
* Inspired by: | |
* http://designedbythomas.co.uk/blog/how-detect-width-web-browser-using-jquery | |
* | |
* This script is ideal for getting specific class depending on device width | |
* for enhanced theming. Media queries are fine in most cases but sometimes | |
* you want to target a specific JQuery call based on width. This will work | |
* for that. Be sure to put it first in your script file. Note that you could | |
* also target the body class instead of 'html' as well. | |
* Modify as needed |