We can display user's identity based on their properties other than username, including actual name, email address, or user ID using the module RealName .
Drupal 7
In order to add a new theme template file (.tpl.php file), we need to implement hook_theme() in our Drupal 7 module. A theme template need to be specified in the hook_theme() function. They produce HTML and renders Drupal render array elements to the screen.
Technology has completely changed the way businesses were operated in the past. Now, marketers can make their products available to the customers at their finger tips at any place and time. About two decades ago, nobody could ever imagine that buying and selling would be carried out in such a seamless manner sans the brick and mortar retail outlets. All this has been possible only because of technological advancements. Technology is progressing in leaps and bounds, opening newer avenues for success.
While using the D3 implementation in one of my project for collapsible tree, I used the following piece of codes to add dragging and zooming feature in the tree. At first I have downloaded the D3 JS and loaded to the page callback as specified in the D3 implementation notes.
We can create custom rules programmatically using the function hook_rules_action_info(). hook_rules_action_info() is a useful hook provided by rules API to create custom rules programmatically. We can use our custom functions to perform the actions that we require.
Following is a sample of the hook_rules_action_info implementation:
In Drupal 7, when we do customizations we would want the custom module to create content in the form of a render array. We know that a page callback should return a render array which allows the custom module to handle the content as long as possible in the page generation process. Sometimes, wrapping two render array elements together could be an easy way out while dealing with render array manipulations. Here is how we can achieve that.
Drupal offers a variety of ways to implement solutions when it comes to custom theming and it has been abused often due to the very same reason. Choosing the right way is what Drupal developers find tricky. If it is not done right, it is quite likely that you 'Awesome Drupal Website' would turn into a code-monster soon. This can even make maintenance difficult. Hope this 'tiny bit of' information could help you through it.
The purpose of implementing hook_theme either in a custom module or theme is to register it's theme implementations which specify how a particular render array is to be rendered as HTML.
In one of my project, I want to display a hierarchical structure of an array by using D3 JS, which should be collapsible. Lets checkout how we can implement, D3 JS in Drupal 7 with collapsible concept. Do you want the implementation like this, get a quote and make use of our expertise.
The drupal_write_record function is used to insert or update a record in the database based on the schema of the table. It helps in executing less database query. Let's take a look at the function given below.
While working on a Drupal project, I had to draw three concentric circles. Each circle was supposed to display the currently entered data in three text areas, called a golden circle. Using Raphael's JavaScript vector graphics library in Drupal 7 makes your work really simple. Please go through the following steps:
View is the one of the popular Drupal module. Views are used to display a list of data, table of data etc. This article will guide you in recreating a view in Drupal 7. Its very easy to recreate a view.
Now all themes are in responsive manner. Bootstrap is the one of the best responsive theme. Its the good starter theme for Drupal 7. It has a lots of specific styles for every designs and we can create a subtheme from Bootstrap theme. It also become a good responsive theme.
Rules are very important and most common using thing in Drupal. We can create custom rules programmatically using the hook_rules_action_info. There is a useful hook hook_rules_action_info() provided by rules api to create custom rules programmatically. Using this We can use our custom functions to perform the actions that we require.
The drupal_static() function provides a temporary storage for data that should stick around even after execution. It also provides the central static variable storage. It preserves the data within a page request as well.
[Drupal] How can we assign different groups for a user and retrieve using Organic Group in Drupal 7?
In one of my Drupal project, we had a requirement to set a 2 level arrangement for users group. That means, we want to add more than one group for a user, in one of our Drupal site. Our experts find a solution for this by implementing Organic Group with user's account by some custom codes. Do you have a requirement like this? Connect with us.
JQuery and AJAX are very useful for loading data into the page without refreshing the web page. AJAX tabs can load content from remote files or URLs. In this example, the content of each Tab will be loaded dynamically with Ajax.
JQuery slider allows you to select a value from a numerical range by simply dragging the slider. The following notation notes will help you to configure slider settings in your JavaScript file.
Entity in Drupal 7 makes web development much easier, like building structures using LEGO. We can build Entity types, that can be made Bundles. Here we can add fields and then create Entities. This article explains how to add fields.
I had a requirement to create webform in multiple environments. Webforms cannot be exported as features. Webform_share module helps to export the webform and then imported the same in my different work environment. The Webform_share module requires webform module. For installation, download and enable the webform_share module.