Planet Drupal

When you need to dynamically display a block within a region, nothing can really beat the Context module. It allows you to define a set of conditions, that when met, executes a set of reactions. For example, you could create a context rule which adds a block to the sidebar second region (reaction) when a user is viewing an Article content type (condition).

A lot of what Context does can also be achieved using Panels. But if you're new to Drupal, and never used Panels than Context will be easier to use.

If you're new to Context then I would highly recommend you watch the two introductory videos below:

Recently I've discovered a powerful module called Context entity field. It allows you to define a condition that checks the value of a field on an entity.

Every Drupal site builder will at some point experience the dread of accidentally making configuration changes on production thinking it's their local site. This sort of thing can easily happen when you have 20 tabs opened and forget which site you're currently browsing.

Luckily there's a module you can use to indicate which environment (local, staging, production, etc.) you're currently viewing and it's called Environment Indicator.

The module helps to separate each environment by displaying a coloured indicator. The indicator itself is fully configurable. You can change its colour, position and text.

In this tutorial, you'll learn how to create an indicator in two ways: through the module's UI and with some code in settings.php.

Whenever I post a tutorial about sending emails using Drupal, the first question I get asked is how to send emails as HTML. By default, emails are sent as plain text in Drupal 7. There are a few modules out there that allow you to send emails as HTML like Mime Mail, HTML Mail and Swift Mailer.

There are a few benefits in sending emails as HTML. For one thing, they can be styled and images can be displayed. Also, it's easier to track open rates and clicks if the email is HTML. However, there are some downsides to using HTML. One thing I've read about is that HTML emails are more likely to be flagged as spam. Especially if your whole email is just a single image.

In this tutorial, you'll learn how to use Mime Mail to configure Drupal to send HTML emails. We'll also look at how to send them using Rules.

The standard look and feel of Bootstrap is unmistakable and often you can spot a website using it a mile away. The dead giveaways are the buttons and navigation, but it doesn't have to be this way.

If you want to change the look and feel of your Bootstrap site then take a look at Bootswatch. It offers 12 great looking themes, and best of all they are free and open source.

In this tutorial, we'll learn how to use a Bootswatch theme in two ways. The first method will show you how to use the BootstrapCDN and in the second we compile the LESS files ourselves.

So you created a module that you want to put on drupal.org. But just before you release it, you realise it could do with a few default views.

You may think you can use Features for this, but Views allows you to ship default views by creating a module.views_default.inc and implementing hook_views_default_views.

Now, Ctools can be used to generate the required export code that needs to be placed in hook_views_default_views. We'll use a sub-module in Ctools called "Bulk Export" to generate the code.

It's important to understand that there is a difference between "Bulk Export" and Features. The difference is that you can only export CTools' configuration objects using "Bulk Export". Whereas, Features offers full API for integrating any module with it.

In this tutorial, you'll learn how to export default views using "Bulk Export".

When it comes to managing the look and feel of a content page, nothing can beat Display Suite. It's become an essential module for when you need to change the layout and fields on a node or any entity page.

Today I want to talk about a piece of functionality that you may not be aware of in Display Suite. It's the ability to switch the view mode will be used for an individual node.

Let me explain, when you go to a node page (node/1) the "Full content" view mode is displayed. But, you can only have a single version of this view mode for each content type.

Display Suite can be setup to allow authors to select a specific view mode on an individual node.

Instead of displaying "Full content", you could, on a select group of nodes use another view mode called "Feature landing page".

This functionality is not exclusive to Display Suite. You can do similar stuff using Panels or Panelizer.

In this tutorial, we'll create a custom view mode called "Full content feature" and we'll allow an editor to select which one will be used on individual nodes.

Bootstrap is a mobile first front-end framework that allows a developer to build websites quickly. The framework comes with a lot of reusable CSS styles, components and jQuery plugins.

One thing I like about Bootstrap is its CSS styles and components. You get access to all sorts of useful things like Tables, Thumbnails and more.

Now, implementing these components in Drupal can be tough. You can either change Drupal's markup or use Mixins.

But there is a module that can help you display components (and some plugins) within a View; and it's called Views Bootstrap.

The module allows you to use components and CSS styles directly from the Views edit page without overriding templates or creating mixins.

In this tutorial, I'll show you how to create a "Recent articles" block using Views and the Media object component.

On a community website, it's a good idea to send some type of follow-up email a week or month after a user registers. This email can be used to ask for feedback or promote useful features.

This type of functionality can be built in a few ways. You could use a 3rd party email service like MailChimp or AWeber to send the follow-up as an auto-responder.

Another possibility, is to send the follow-up email directly from Drupal.

In this tutorial, I'll show you how to use Rules Scheduler (part of Rules) to send a follow-up email one week after a user registers.

Now, every website is different and you may want to send this email after three days or one month. By using Rules, you can adjust this type of configuration directly from Drupal without writing any custom code.

The common approach these days for storing geolocation data is to use a combination of Address Field, Geofield, geoPHP and Geocoder. Another way, is to use the good old Location module.

But, today I want to show you how to use the Geolocation Field module

The module implements a field that allows you to store longitude and latitude coordinates. But where the module really shines is with its field widgets and formatters.

It ships with two sub-modules called: "Geolocation Google Maps" and "Geolocation HTML5".

The "Geolocation Google Maps" sub-module comes with a pretty cool widget that allows a user to select a location using an address or by clicking on a map. You can select a location by entering in an address and if the location is not right, then just click on the map and fix it up.

The "Geolocation HTML5" sub-module allows you to define your location using HTML5's geolocation API.

The Views Send module allows you to compose and send emails directly from a views listing. The module makes it really easy to create a views listing page where an editor can select a few rows and send out mass emails.

For example, if you're using Drupal Commerce to sell a particular product you could use Views Send to update your customers on the progress of their order. Just make sure you don't spam the customer with a lot of emails.

A lot of what Views Send does, can be achieved using other modules like Simplenews, Rules and possibly Views Bulk Operations (VBO). However, Views Send is easier to use and the module is fairly lightweight.

In this tutorial, we'll create a page that lists Drupal users and use Views Send to send out emails.

Pages

Subscribe to RSS - Planet Drupal