Skip to main content
161
results
Andrew Fletcher
Do you want to know how to add a node alias in a twig file?  Rather than do the set up in a custom module or using your theme file. To be able to create a node alias in a twig file you need to know the node.nid value.  Obviously without it you have nothing to reference from.  In this example, the node.nid value is extracted during a loop.  A fairly standard loop such as {% for row in rows %} // ... script doing some magic ... // {% endfor %}Begin by setting the nid value...
Andrew Fletcher
If you edit a Drupal contrib module, the next time the module is updated those...
Andrew Fletcher
As a web developer, you will most likely need to run local copies of a bunch of...
Andrew Fletcher
Every project has to kick off somewhere.  Yep well that's a no brainer....
Andrew Fletcher
The cache system in Drupal 9 delivers the API with the elements required for...
Andrew Fletcher
How to get the current user or load a user using a uid value. $current_user = \Drupal::currentUser(); $user = \Drupal\user\Entity\User::load($current_user->id());or just use $user = \Drupal\user\Entity\User::load(\Drupal::currentUser()->id());An example of this in action /** * Change the display of the user's name. * * @param int $uid * User id. * * @return string * User name. */ function change_users_name($uid) { // status of the current user $logged_in =...
Andrew Fletcher
Running a few SEO and performance tests and I discovered that the site logo...
Andrew Fletcher
How do you exclude the current node from a list view? In some situations, for...
Andrew Fletcher
I installed Lando 3.6.2 and Laravel 9.  When I visit the web page, I...
Andrew Fletcher
I'm receiving an error with a path of Drupal\path_alias\AliasManager Upgrading...
Andrew Fletcher
Do you want set up a CI/CD process using GitHub Actions? This is a walk-through basic setup to automate your integrations and deployments for your projects.   GitHub Actions GitHub Actions allows for your code can be built, tested and deployed from GitHub.  Let's explore an approach in managing CI/CD processes using GitHub Actions.   Set-up - having a plan Creating a basic CI/CD setup for a Laravel application.  The CI/CD setup will monitor push and pull requests made to our...
Andrew Fletcher
If like me you tried the command php artisanHowever, you had the following...
Andrew Fletcher
Let say in composer.json you have "drupal/core-recommended": "^9.2" You're...
Andrew Fletcher
Have you tried adding custom synonyms to Solr on Drupal? How did you go? What do...
Andrew Fletcher
Running Docker Dangerous word... I'm assuming that Docker is installed....