Many of us have to handle web based projects that are used in production, which provide various services to the public. When dealing with such projects, it is important to be able to build and deploy our code quickly. Doing something quickly often leads to errors, especially if a process is repetitive, therefore it’s a good practice to automate such a process as much as possible.
Spend three minutes on each question, and you'll have a solid 20 minute interview that will tell you a lot about your prospective candidate's Drupal cred.
Twig can be extended in many ways; you can add extra tags, filters, tests, operators, global variables, and functions. You can even extend the parser itself with node visitors. In this blog,
I am going to show you how to create new custom twig filters in drupal. For example we are going to create a filter to remove numbers from string, will explain with hello_world module.
Create hello_world folder in modules/custom/ folder with the following files,
Slim is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs. At its core, Slim is a dispatcher that receives an HTTP request, invokes an appropriate callback routine, and returns an HTTP response.
In this blog, I am going to show you how to setup application in that.
Download & Install :
Composer is the best way to install slim framework and create project using Slim-Skeleton as a base.
Sometimes a little trick would be the key for the biggest solutions, In wistia there is an option called videofoam to create responsive video embed code, but unfortunately it is not yet available for playlist embed. In this blog I am going to show you a simple trick to get responsive wistia playlist in yours embeded sites in the following steps,
Choose anyone of your favourite theme while creating embed code, but if you choose BENTO theme, just enable the option to make playlist menu in the bottom of the video
see the scrrenshot
One of the most favourite and valuable features in drupal is multisite configuration, Drupal 8 provide simple way to create multisite it reduced lots of works. The following steps shows to configure multisite in drupal 8,
Drupal have proper UI to create nodes but programmer should know to create a node programmatically, It might need in a custom module or any scripts. The following code would help to create node with the image field in drupal 8,
JPEG is a lossy format, which means you lose information every time you save it, even if you choose 100% Quality, But all the JPEG images have some information (comments/Meta) data within it without losslessly. A tool does this magic is called JPEGTran and is likely already have an UNIX/Linux , If not see how to install it in linux and windows exe file here.
So optimize the JPEG information without losslessly with removing meta information and comments, The following command would do the magic,
Speed up the website loading time is one of the option to increase the site SEO performance which means to get more visitors for the site. The following would happen for a second delay page load time,
- 11% Fewer page views
- 16% decrease customer satisfaction
- 7% loss in conversion
And also some studies founds the following interesting results, It might be shock you,
Array is a structured data which holds different types(string, array, object) of values and one or more values in a single variable, for example if you want to store 50 different types of values in a single variable instead of storing in 50 separate variables the array would help in that situation.
There is three different types of array available,
1. Numeric Array :
The array stored value's index will define by numbers, the index will be starting from zero.