As a developer we always been into position where we need to write a custom script which bootstrap's Drupal Core from code and do some operations. This is pretty straight forward when working single site. But when working with Multisite or sub-site, how we can do this.
Note: Make sure you're enabling this only on development server.
It's very common for any developers to make a mistake while developing, which will result in White Screen of Death (WSOD). WSOD is normally because PHP error reporting is turned Off.
Here's how you can enable error reporting using PHP.ini file:
The current project I'm working on has a lot of customization of Drupal Commerce and display of views. One of the customization I've done is while displaying views result, show total of two views results in one view i.e. there are two views viewA and viewB shown on page, which shares the output and so we need to show the sum of total results in viewA and viewB will be displayed in viewA header.
Here's how I've achieved this with only few lines of code:
Today we're going to see how we can retrieve the payment method settings when ever we required. The payment methods are used to accept the payments from user during Checkout process. More details on payment in Drupal Commerce can be found here.
Views module provides the ability to site admin to allow users to select the filters and dynamically refine the results based on selection made. This can be achieved using exposed filters in views. By default the exposed form looks like normal form i.e. fields to select filter, Apply button to get refined results, etc.
Using views UI, we can tweak exposed form and do following things, without writing a single line of code:
Chaos Tool Suite is one of the best API module to use. The module mainly provides API.
I've worked on ctools before to create multi-step form and show that in popup. This time I'm working on a project which has a Quiz in it which is built using ctools. The site was having a requirement of displaying Quiz form when user clicks on link from E-Mail.
So to display ctools modal on page load we've to add below jQuery Code:
Views one of the great module available in Drupal. Views can be used to show various types of dynamic data and can also be used to allow users to filter results based on his criteria. To allow users to filter results based on his criteria we normally use views "exposed filter" option in every filter we add in view (screenshot 1.0).
After installing Drupal 7 we get User login block on left sidebar. But what if you disabled the User login block and need to log in, you can visit the login page on:
Drupal 7 field module defines a field level template file, which defines the HTML structure of the field. We can use this file to override the display of field including changing how label will be display. The file is named as field.tpl.php which you can find in side the "DRUPAL_ROOT/modules/field/theme/" directory.