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.
Drupal Technical
A patch is a small file which shows what was changed in a repository. It shows the new changes in an existing file, details of the new files in the current directory, file deletion details etc. A patch file can be pushed to the git repository so that it is useful in the future for updating the changes in the corresponding file.
For creating a patch file in your current git repository, make changes in your files. Now open the terminal.
For unstaged changes, type the following command,
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 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'
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,
I came across a situation in my recent project, where user roles other than admin have to access the admin pages. The default admin theme was not provided for the admin pages in which the user role is not admin.
Drupal has a module which allows us to add the admin theme to specific pages irrespective of the user role. Below are the steps which I followed to achieve this.
Developments in machine learning have a great influence on the e-commerce sector. Online purchase is steadily on the rise, allowing companies to capture all kinds of data on the customer experience, including
Administration Menu Source module is used to display different menus based on the roles existing in the system. This module is only available in Drupal 7. We can install the module using the following steps :
Installation
Views query alter is used to edit the query in views that we created using Drupal. In cases where we cannot add fields in views, we can use hook_views_query_alter to change the query in views.
Have you ever found it difficult to access a private file within Drupal? Then read on.
To render a block, a few methods are used. One way to render is to use block_load() function. In order to render a block, the following syntax is used,
Moodle is a Free and Open-Source Software (FOSS) learning management system written in PHP. Drupal is also an Open-Source CMS. We require to integrate Moodle and Drupal with a single login system. For that, I have followed the steps mentioned below.
Changes to be done in the Drupal site:
Drupal is a scalable and secure content management framework which help organizations build their digital platforms. In this article I am presenting a situation where Drupal helped implement a feature for one of our client, without affecting the site's scalability and secure nature.
The client’s site went down to maintenance mode for some users unexpectedly. This happens very rarely and there was no immediate visible reason that could point to the cause of it. So it was imperative that we log when the site goes offline in order to debug the issue.
For one of my project, I have implemented the Chosen module to display a list of content in a select box with user-friendly option style. I used the following configurations:
Many Drupal users wanted to know if there was a functionality similar to UberCart test_gateway for Drupal Commerce for emulating the collection of credit cards. If you are faced with the same question while running Drupal Commerce on your Drupal site then read on to know the possible solutions.
Authors: Adrian McDonald Tariang, Anish M.M.
Drupal 8 Render Pipeline is the sequence of steps through which Drupal 8 generates a response to an HTTP request. ie, it’s what’s going on under the hood of Drupal 8.
Media companies on a daily basis create, manage and publish huge volumes of digital files or assets. These digital assets which include images, audios, videos, graphics, documentation etc need to be properly managed. Digital Asset Management (DAM) systems are solutions to store, organize, locate, retrieve and share these digital files. The management of these assets include workflows, complex asset access controls, preset standardizations, storage specifications.
By using Views Slideshow module we could simplify the procedure of developing a slideshow in Drupal. As per the requirement I have found one feature lacking, i.e, a full screen option. I like to introduce a script that would turn slideshow images to the size of browser window. That is, it would turn image or html element to the measure of view port maintaining the content quality. This would be useful for setting an image as background of a page, so that entire viewing area would be covered.
In one of my works, I want to programmatically uncheck the checkbox option of 'Generate automatic URL alias' for a specific node editing form. For this, I have created the following form alter for the content type. I have added a custom after-build function for the necessary content type in the form alter.
Docker is an open source platform for system administrators and developers to build, ship and to run distributed applications, whether its on the cloud, data center VMs, or on the laptops. Docker helps to automate the deployment of Linux applications inside software containers.