Blog

Add language switcher to Toolbar

Having a lot of Canadian clients, we end up creating a lot of sites which require switching between French and English. Recently, I had to add the language switcher to the default Toolbar module where the username/login/logout links appear. Here's how I did it.

Step 1

First, ensure you have at least two languages installed. But due to the limited real estate on the toolbar, try to not have more than 3 or 4 languages.

Step2

Next, go to your theme and add entry in your template.php file for the following preprocess hook Read more about Add language switcher to Toolbar

Mobile Tools and jQuery Mobile code sprints

It's been a long time since we've updated the world on where we stand with Mobile Tools and jQuery Mobile alike. Well the long and short of it is we were really busy with projects which didn't require those modules. But that's all about to change!

We've started working on Mobile Tools and jQuery Mobile once again for a product we're working on (very hush hush) and for a new project we're starting with a client. That said, it's about time we get stable releases for both modules. Read more about Mobile Tools and jQuery Mobile code sprints

Adaptive Images and Drupal 7

Having adaptive images is an great addition to an responsive website. Not only will it reduce page load times, but it will make the site perform better on small devices with limited resources. But wouldn't it be nice if there was an easy way to integrate adaptive images in with your current Drupal site? And if you could pick as many images styles to generate the adapted images as you wanted? And if it was integrated with the Media module so you could insert adaption images using a wysiwyg editor? Read more about Adaptive Images and Drupal 7

jQuery Mobile with Drupal 7

A few months back I did a talk at DrupalCamp Montreal on using jQuery Mobile with Drupal. The message passed along during that talk was essentially, jQuery Mobile and stock Drupal 7 don't work together. It boils down to the version of jQuery that Drupal 7 ships with (1.4.4) is too old and doesn't work with the latest version of jQuery Mobile (which required jQuery 1.6.x or higher).

But that didn't stop our enterprising developers from finding a way to get jQuery Mobile and Drupal to play well together. We decided to tackle the three aspects holding Drupal and jQuery Mobile back from working together:

  1. Drupal Core compatible with jQuery 1.6.x and jQuery UI 1.8.x
  2. jQuery Mobile module to integrate the library
  3. jQuery Mobile compatible theme elements

Using bash "alias" with Drush to save on typing

Drush is great. In fact, I can't remember a time where I didn't use drush as a daily tool for managing and developing on Drupal. It saves so much time and effort from clicking through configuration windows in a browser and instead allows you to type out what you want directly.

But can we do better? Can we save even more time? We sure can!

If you're using bash in your terminal (which you most likely are) you can setup "alias" commands to shorten often used typed out commands. Read more about Using bash "alias" with Drush to save on typing

Pages

Subscribe to