developer resources
Codebales holds an ever growing number of solutions to problems that we have experienced in our day to day code writing
Selected filter
36
results
Andrew Fletcher
•
Currently, I have a situation where I have two repositories. The first is where I've held the code since the beginning. The second has come on board recently and is the client repo. However, rather than shut the original down, I want to keep both running with the same code. How do I synchronise them so that they contain the same thing?
Configure a remote that points to the upstream repository in Git to sync changes you make in a fork with the original repository....
Andrew Fletcher
•
Working from the bases that .DS_Store has not been added to your git repository,...
Andrew Fletcher
•
Adding git tag to your actions.
The regular process that I work to is
git add...
Andrew Fletcher
•
Do you want to know how to add a node alias in a twig file? Rather than do...
Andrew Fletcher
•
If you edit a Drupal contrib module, the next time the module is updated those...
Andrew Fletcher
•
Changing git push from passphrase? There are several ways to tackle this step. I'm going to focus one of these steps.
From your web directory root, look for your .git directory. Then open the .git...
cd .gitNext using your shell prompt (iTerm2), view the contents of the config file
vim configPresently the config file looks like the following
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
...
Andrew Fletcher
•
Having access to a site’s URL in your templates can come in handy for many...
Andrew Fletcher
•
I want to create a content type that has a paragraph. Easy enough.
What...
Andrew Fletcher
•
Since upgrading to Drupal 9.3.0 have you come across this error?
Edit...
Andrew Fletcher
•
When you have an entity ID value such as node ID (nid) or taxonomy term ID, how...
Andrew Fletcher
•
Working in Twig, I had to add classes to a pre-existing array. Whilst I've grown used to the patterns in PHP, these cannot be applied in Twig. Instead I had to merge the new array elements.
Non associative arrays
Working from a base level, I'll begin as if the original array hasn't been set. The merge filter expects as first argument an array whose content will be merged with the assigned variable:
{% set myArray = [] %}
{% set myArray = myArray|merge(['tw-flex-inline'])...
Andrew Fletcher
•
Working in Laravel, I needed to loop through an array and know whether the...
Andrew Fletcher
•
iOS localization on the fly
If you have added languages to your app......
Andrew Fletcher
•
Whatever you are coding - code clarity is your goal.
Before you scream and...
Andrew Fletcher
•
To create a .pem file, is quick once you have your .p12 certificate. I...