Have you been trying to index your node to Apache immediately after its been created, updated or deleted! Read On!!
By default Apache Solr uses a queue system to index data to Solr. We can preconfigure the interval in which the indexing should perform. Still, there occurs a delay for the node to get indexed.
How To
Most often we may want to show our custom forms in blocks. Here are the simple steps to accomplish this.
In the below code we will create a form called “MymoduleExampleForm” and this form will be placed in a custom block called “MymoduleExampleBlock”.
Step 1 – Create a custom module say 'mymodule'. For details on how to create a custom module in Drupal 8 See here
Step 2 – Create a php file named MymoduleExampleForm.php in mymodule/src/Form and place the following code.
In Drupal 8 we can load an image using image style in a custom function using the file id of the image. For this first, we have to create an image style by configuration or create a config file for the same (Example below: image.style.sample_image_style.yml). Note that we can generate the below file after creating an image style and export the same from config synchronization in Drupal 8.
Remember Pokemon Go? The game that once had everyone, from kids to adults, wandering around with their smartphones in pursuit of virtual creatures? This wasn't just a gaming fad. It was a groundbreaking example of how AR could blend the digital and physical worlds, creating an immersive experience. Pokemon Go demonstrated that AR has the potential to go beyond gaming, setting the stage for innovative marketing strategies.
Patternlab is a dynamic organizational and prototyping tool for Drupal theming. By theming with pattern lab, your custom theme allows us to manage and build components in accordance with the required workflow using atomic design concepts1.
Using Pattern Lab for Drupal 8 Theming
Instead of rendering default Drupal templates, we can introduce pattern lab to include twig files using atomic concepts. It allows us to include external twig files by overriding the specific templates.
Kraftwagen is an Open Source deployment tool that is built entirely on top of Drush. Kraftwagen makes Drupal “easy to use” for developers, who customize Drupal extensively, need staged deployments, and use version control systems to collaborate. It provides a set of commands for 'drush make' based Drupal development workflow.Benefits of using Kraftwagen for security updates
By using Kraftwagen to deploy security updates, the benefits are multifold, which include
Visual Studio Code is one of the most popular and lite editor software. This article describes how Drupal coding standards can be implemented in Visual Studio Code Editor.
Open Data Kit (ODK) is an open-source suite, a set of tools that helps to build survey forms. It can be used to collect data through a mobile device and then the data can be sent to a server. We can aggregate the collected data on the server and extract it in a useful format.
Six quick steps to install the latest version of PHP Debugger in Ubuntu.
While working on a project using git repository, if you want to create and switch to a new branch, then use: git checkout -b [my-branch-name]
To simply checkout a branch, use: git checkout [my-branch-name]
If you want to rename a branch when pointed to any other branch, you can type the following command: git branch -m [old-branch-name] [new-branch-name]
To rename the current branch, use: git branch -m [new-branch-name]
In one of my work, there was a requirement to uncheck the option for 'Generate automatic url alias' checkbox for all nodes. I used the Pathauto module with version 7.x-1.2 for handling standard urls in the site. When changing a node title, its URL automatically changes. In case one forgets to uncheck the option 'Generate automatic url alias' in the node editing form, you can uncheck the option with the following steps:
HubSpot CRM manage sales processes of organizations. We can create contacts, company, leads, tasks using direct HubSpot CRM UI or using APIs provided by HubSpot. Here we are going to look at the APIs to create, update and delete companies.Create a CompanyThis API is useful when we are integrating HubSpot with other site.https://api.hubapi.com/companies/v2/companies?hapikey=demo&portalId=62515Required Parameters to send Request
For a recent project, I had a requirement to implement menu tabs in Drupal 7. Let see what are the necessary code for the same. First I created menu tabs in .module file using hook_menu() with the following codes.
To render a Drupal form to a node, drupal_build_form function is used. This function allows us to render all forms except the admin forms. Note that, admin forms didn't find success while rendering the same. In-order to render a form the following syntax is used,
In this article let us see how to use Google API with a simple example. Google API helps working with G-plus, Google Drive, Youtube etc.
Setting up a new virtual host in Apache usually requires a number of steps such as creating and enabling the virtual host configuration file in /etc/apache2/sites-available/ path, setting up local hosts file and so on.
In this article I will be explaining how to create a custom media gallery functionality using the library Fancybox.
First step is to create the content type 'Media Gallery(media_gallery)' and add the following fields in page 'admin/structure/types/manage/media_gallery/fields'
When you want to change from the black and white colors in your git, you can use the default git color configurations using the command:
git config --global color.ui trueThe --global is optional, if you want to make the coloring for the current repository, ignore this and type it as:
For a recent Drupal project there was a requirement to find the pages that a user visits on the site and send that to Google Analytics. Here, first we should save the page links that the user visits. But for this we need,
This article will explain, how to display mouse over image for a gallery block image or on any content image in Firefox Web Browser.
While working on a project I required to display a mouse over the image, say 'View More' image for the last image in a gallery block. For the mouse hover in the image tag, I added a background image. See the code below.