Skip to main content
36
results
Andrew Fletcher
To POST an image is similar to the other posts mentioned on this site.  This article works through the steps to post an image. To be able to get, patch or post you need to log in the member so you can retrieve their user id (uid). Calling a query To POST an image, the details required are: Authentication credentials; Base64image - converted; Directory_path - the directory path is constructed by combining two directories: pictures/date, where date is prepresented as...
Andrew Fletcher
For an introduction to setting up RESTful hal+json refer to the set-up...
Andrew Fletcher
The user API, was originally created under the General...
Andrew Fletcher
The development version of the app database is held on the staging site....
Andrew Fletcher
The user parameters provides details about a specific user based...
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
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
If you are receiving the following 403 errors: "message": "The used...
Andrew Fletcher
Adding an image via RESTUI can be done in a snap... once you know how!  I...
Andrew Fletcher
The magically descriptive error 401 Forbidden "message": "Access...