Drupal, Typescript, Angular and Midjourney blog content, code snippets and tutorials.
Blog
Running cron more than once an hour in Drupal 10
Cron is an essential component of Drupal that is used to automate repetitive tasks, such as checking for updates, sending emails, and cleaning up old data. By default, Drupal runs cron once an hour, but in some cases, you may need to run it more frequently. If you're looking for a way to run cron more often than once an hour, this article will help you do so.
Blog
Changing the 'Name' Label on Term Add/Edit Pages in Drupal 10
A common issue that developers face in Drupal is changing the 'Name' label on term add/edit pages. This label is used to identify the name of the term being added or edited and is an important aspect of the user experience.
Blog
How to remove a configuration object from the active configuration in Drupal 10
If you have a Drupal 10 custom module defining a field storage configuration object and you face issues while reinstalling the module after uninstalling it, you may need to manually remove the configuration object. To do so, you can use different methods like hooks, Drush commands, and Drupal console commands.
Blog
Installing a Drupal theme from GitHub with Composer
In this blog post, we'll guide you through the process of installing a Drupal theme from a GitHub repository using Composer.
Blog
What are Storybooks in Front-end Development
As modern web applications become increasingly complex, it's important to find efficient ways to develop and manage UI components. In this blog post, we'll discuss the benefits of using Storybook in front-end development, and how it can enhance your workflow and improve your application's overall quality.
Blog
Getting node URL path using entity query in Drupal
In this blog post, we'll explore how to get a node URL path using entity query in Drupal. We'll discuss different methods to generate URL strings and provide examples.
Blog
Deleting nodes of a given content type with Drush
To delete nodes of a given content type with Drush, you can use the following commands depending on your Drupal and Drush version.
Blog
When to create an entity instead of a new content type in Drupal
This blog post aims to help you understand when it is appropriate to create an entity instead of a new content type based on your requirements.
Blog
Programmatically render node field respecting the view mode settings in Drupal 10
In Drupal, sometimes you may want to render a node's field inside a block while still respecting the view mode settings. In this blog post, we will demonstrate how to achieve this using Drupal 10.
Blog
Solving the mystery of missing Meta Tags on your Drupal frontpage
Meta tags play a crucial role in SEO and social sharing, so it's essential to ensure they are set correctly. In this blog post, we'll discuss how to troubleshoot and resolve the issue of meta tags not appearing on your Drupal 9 front page.
Blog
Setting up permission to manage users but not adminster all users in Drupal 10
The Role Delegation module is a handy solution to this problem, as it allows you to delegate the management of user roles without giving the full "administer users" permission
Blog
When to Use Services Directly and When to Use Containers and Object-Oriented Programming in modern Drupal
This blog post will discuss when to use services directly and when to use containers and OOP in Drupal.
Blog
Overwriting Routes in Drupal 9 & 10 using Route Subscriber and Custom Controller
In this blog post, we'll walk you through the process of overwriting a route in Drupal using a route subscriber and a custom controller. This can be useful when you want to change the functionality or appearance of an existing route without modifying the core or contributed modules.
Blog
Filtering entities with EntityQuery using "Is Not Equal To" condition
In this blog post, we will discuss how to filter entities based on the value of a multiple-choice field using EntityQuery in Drupal. The goal is to return all entities except those with a given value ('doe' in this example).
Blog
How to install a Drupal 8 contrib module in Drupal 9 or 10 with composer
In this blog post, we will discuss how to install a Drupal 8 contrib module with a Drupal 9 patch using Composer. This process can help you avoid duplicating the contrib module in your project's custom codebase and streamline your workflow.
Blog
Moving an image file with hook_update in Drupal 10
I had this issue where the generic thumbnail of a media item of type file had gone missing. Because this was a multisite installation, I had to automatically find a solution. Here is how I did it:
Blog
Understanding Hooks in Drupal (with examples)
In this blog post, we will provide an easy-to-understand explanation of hooks in Drupal 9 along with some code examples that are compatible with PHP 8. If you're an intermediate PHP developer looking to improve your skills and start learning Drupal, this post is for you.
Blog
How to Fetch and Display the Label of a List Field in a Twig Template (Drupal 10)
In this post, we will explore some of the most effective methods to help you display the label of a list field in your Twig template.
Blog
What's new in Drupal 10
In this blog post, we'll take a closer look at some of the enhancements that are expected to improve performance, reduce the hassle of writing new code, and support community initiatives for bug-fixing and addressing issues.
Blog
Midjourney v5 Lighting Tips 📚
Lighting is a crucial element of your prompt, as it significantly impacts the quality and mood of the image.
Blog
Midjourney v5 Theme Tips: how to give style to your images
In this blog post, we will take a look at some of the best themes that you can use on Midjourney v5.
Blog
Midjourney Camera & Film Type Tips
If you're looking to change the overall effect of your generated image, adding the following camera and film type keywords and styles to your prompt may help
Blog
Body types & Ethnicities in Midjourney
Discover various techniques to represent a wide range of characters in your writing. Combine these methods with appropriate language to develop the personas you have in mind.
Blog
Add an actions link with route and query parameters in Drupal 10
Actions links are links that appear in various places in the Drupal admin interface and allow users to perform common tasks. You can add your own custom actions links with route parameters and query parameters to make it easier for users to perform specific tasks in your Drupal site
Blog
how-to tips for using Midjourney to create aesthetic art
To create a specific aesthetic, you can reference different art movements, techniques, genres, media types, and more
Blog
Holding objects in Midjourney: a comprehensive guide
Are you struggling to generate the perfect image of a character holding a specific object? In this article, we'll explore tips on how to use Midjourney V5 to generate the perfect image of a character holding a handheld object.
Blog
Midjourney V5: What's new overview
Midjourney V5 has arrived, and it's packed with new features and improvements. In this article, we'll explore what's new in V5, compare it to previous versions, and showcase some sample prompts and outputs to demonstrate the evolution of image output quality.
Blog
Reference image usage in Midjourney guide
Utilizing images in your prompts to enhance the outcome In Midjourney v5, you can incorporate reference images as part of your prompt to influence the job's composition, style, and colors.
Blog
How to Use the Ternary Operator in Twig in Drupal 10
In Drupal 10, you can use the ternary operator in the same way as in regular Twig code. Here's an example of how you can use the ternary operator to create an array of CSS class names based on some conditions:
Blog
Drupal Behaviors: A How-To Guide to Javascript
Writing JavaScript code in Drupal can be challenging because of the way Drupal handles JavaScript. Drupal has a concept called "Drupal behaviors" that can help you write better JavaScript code that works consistently across your site.
Blog
How to include multiple content types in an entityQuery in Drupal 10
To include multiple content types in an entity query in Drupal 10, you can use the IN operator. The IN operator allows you to specify an array of content types to include in the query.
Blog
Midjourney v5 Camera Angle Tips (with examples)
When working with Midjourney, you have the power to control the camera zoom and angle of your generated image. By adding specific phrases to your prompt, you can direct Midjourney to capture your subject in various ways.
Blog
Punctuation in Midjourney v5
If you're working with Midjourney, it's essential to understand how to use punctuation effectively. While the best recommendation is to use punctuation the way you learned in school, there are a few specific guidelines you should keep in mind when troubleshooting or resolving issues.
Blog
ts2322 error in Typescript explained
If you've been working with Typescript, you may have come across the ts2322 error. This error occurs when you try to assign a value of one type to a variable of another incompatible type.
Blog
The most common TypeScipt errors and mistakes
TypeScript can sometimes be tricky, with its unique features and strict typing rules causing a few bumps along the way. In this blog post, we'll explore some common TypeScript challenges.
Blog
Deploying a conainerized app with Docker
In this blog post, we'll take a hands-on approach to help you grasp the essentials of Docker development. We'll start with an overview of the process and then dive into a step-by-step guide. This post is relevant for developers, operations professionals, and anyone interested in DevOps.
Blog
What are Seeds in Generative AI?
A seed in generative AI is a starting point or initial input that is used to generate an output. Specifically, it is a value or set of values that is provided to the generative model to initiate the generation process
Blog
Creating automatic Node titles with custom Events in Drupal 10
Learn how to use custom events in Drupal 10 for creating automatic node titles. This step-by-step tutorial provides insights into content management and programmatically generating titles for specific content types.
Blog
Deployment identifier in Drupal explained
In Drupal, a deployment identifier (also known as deployment_identifier) is a configuration setting that can be added to your settings.php file. It is used to track configuration changes between different environments or deployments, such as from development to staging or production.
Blog
How to install Docker tutorial
In this blog post, we'll explore two options for setting up a Docker lab environment to help you get the most out of your learning experience: Docker Desktop and Play with Docker. These options are designed for a quick and easy setup, rather than aiming for production-ready, high-performance Docker cluster
Blog
How to use an existing image in your Midjourney Prompts
Here are some tips on how to use image prompts in Midjourney.
Blog
Get url path of referenced node image in Twig and Drupal 10
This snippet will definitely save you some time searching for the proper structure, it loops over entity referenced nodes and sets a background image from that node
Blog
Get url path of an entity reference in Twig in Drupal 10
This post gives you a snippet to get the URL path of an entity reference in Twig
Blog
All the Midjourney parameters explained (with examples)
In this post, we'll explore all of the Midjourney image generation parameters, including basic parameters like aspect ratio, chaos, quality, seed, stop, style, and stylize, as well as model version parameters and upscaler parameters.
Blog
Remove shortcut links with Drush in Drupal 10
During configuration imports, you can stumble upon this issue: not being able to import config because there are existing entities of type shortcut
Blog
Get page title inside of a paragraph in Drupal 10
I encountered this when I had to build a hero paragraph. I needed the page title inside my paragraph.
Blog
How to access custom block content field in Twig (Drupal 10)
I started using custom blocks for reusable content on a website. It turns out twig works a bit different on block content than on paragraphs.
Blog
How to set permissions to a route programmatically in Drupal 8, 9 or 10
Are you looking for a way to create custom permissions for your Drupal 8 module? Since Drupal 8, permissions are defined in a MODULENAME.permissions.yml file.
Blog
What is LoRa in image generation?
LoRA (Low-Rank Adaptation) is a mathematical technique used to reduce the number of parameters that need to be trained when fine-tuning Stable Diffusion models
Blog
A transform pipe to highlight and replace text in an Angular 13 template
I had this project where search results coming from an API service needed to be highlighted.
Pagination
- Previous page
- Page 3
- Next page