Topic view

How to cache pages by role in Varnish

By neerav.mehta Fri, 09/05/2014 - 18:59 5 Comments

Varnish is generally used to cache pages for anonymous users. It is also used to cache pages by role. At Red Crackle, we deploy Varnish to cache pages by role for corporate sites that are exclusively visible only under SSO. This ensures all users are authenticated but there is no user related information present on most of these pages. This article explains how Varnish caches pages and how configuration can be altered to cache pages by role. The article uses hook_init() to set a cookie that identifies user roles. hook_user_logout() is then used to remove the cookie as soon as the user logs out.

How to put a breakpoint in a dynamically loaded javascript

By neerav.mehta Tue, 09/02/2014 - 06:52 2 Comments

This article demonstrates how to insert a breakpoint in a javascript file that gets processed during page load. Putting a breakpoint in a statically loaded JS is quite easily achievable through Firebug or Chrome DevTools. But things are not simple if you are loading a javascript file dynamically using AJAX after a page load.

We insert a breakpoint by first, tweaking the JavaScript file through the addition of code. After this, we reload the web page in Chrome. Access DevTools to add the breakpoint in it when the javascript loads dynamically. On next reload, the code stops at the breakpoint.

How to optimize a Drupal View so that it uses INNER JOIN instead of LEFT JOIN

By neerav.mehta Wed, 08/13/2014 - 09:36 2 Comments

In this article, a query has been optimized to ensure a view loads faster. This is achieved by modifying the view so that it uses inner join instead of left join. On employing this useful trick, we could reduce query time of a view on a site with 80,000 entries from 1.1 seconds to less than 10 ms. Read on if you want to see how.

Configuring Drupal To Enable Integration With AngularJS

By neerav.mehta Sat, 08/09/2014 - 17:36 8 Comments

In this article, we demonstrate how the Drupal framework is configured with the AngularJS framework. This detailed article will ensure you are able to make best use of features from both platforms in your development projects. The article explains the entire process - starting with AngularJS installation and executing a Calendar function - through a series of screenshots. A brief intro to AngularJS is also provided in the beginning of the article. By the end of this article, you will have gained working knowledge to go ahead confidently with Drupal-AngularJS integration.

How to show comma-separated taxonomy terms in Drupal

By neerav.mehta Mon, 07/28/2014 - 16:11 2 Comments

Taxonomy terms look organized when they are presented with a comma in between. In Drupal, however, taxonomy terms do not feature a comma. Instead, they just have a space in between. This does look a bit awkward at times, if there are multiple taxonomy terms.

This article demonstrates how to create comma-separated taxonomy terms in Drupal. This is achieved by altering the CSS file associated with your page's theme.

How to add custom theme settings for Drupal 7

By neerav.mehta Wed, 05/21/2014 - 22:17 2 Comments

Drupal allows users to customize their pages by changing theme settings in the administration section. This can be achieved by creating new settings through the addition of fields of your choice. The article shows how to achieve this through a step-by-step procedure using screenshots. You will have to create a theme-settings.php file to achieve this.

How to create a sub-theme in Drupal 7?

By neerav.mehta Wed, 05/21/2014 - 22:14 5 Comments

This article demonstrates how to create a sub-theme in Drupal 7. The article also explains in brief the characteristics of a sub-theme and the properties it inherits from the parent theme. Does a sub-theme inherit logos and favicons? Learn the answer to this and a lot more in the article. The article also lists the fields you will encounter while creating a sub theme.

How To Create Your Own Custom Drupal 7 AJAX Framework Command?

By neerav.mehta Wed, 05/21/2014 - 22:11 2 Comments

As you already know, the AJAX framework facilitates the creation of dynamic web pages on client side machines. Drupal 7 features a host of AJAX framework commands that can be used to call jQuery commands. But what should be done to perform complex functionality? How do you create customer Ajax commands? This article demonstrates this through video and code.

How To Create And Use Drupal 7 Image Styles?

By neerav.mehta Wed, 05/21/2014 - 22:09 6 Comments

Image styles allow you to set pre-determined graphic templates that lets images on your site have a consistent size or scale. Image styles allow you to crop, resize, desaturate and rotate images before they are displayed. Drupal offers three image styles - thumbnail, large and medium. This article demonstrates creating new custom image styles using Drupal UI.

Send Drupal's Transactional Emails using Mandrill

By neerav.mehta Sat, 01/04/2014 - 06:47 5 Comments

This article demonstrates how to integrate Drupal with Mandrill in order to send transactional emails. For those who don’t know, Mandrill is an application that was developed by Mailchimp. It sends out transactional emails while allowing you to track valuable details about mail analytics. To follow the article, you will have to create an account with Mandrillapp.com. Perform configuration updates as provided in the article. Finally, test the emails to verify if they can be sent via Mandrill.

Ready to get Started?