tutorial

How to count or add all values for an integer field in Views

This may well qualify as a Drupal cheap trick. But it is pretty darn useful if you ask me. The use case - I have a custom content type for daycares. In it, daycare owners can advertize the number of available spaces they have at any time. Creating a list of daycares showing available spaces is, of course, easy with Views. But what if I would like to show the total number of available spaces for the listed daycares. How would I do that?

How to add Javascript in Drupal 7 with jQuery

I thought this would be an easy one. Not so. What works in Drupal 6 doesn't necessarrily work in Drupal 7. Let's take a simple example. How about a script that allows you to show/hide one or more paragraphs. I did a quick Google search and found numerous examples. Here's the one I picked & slightly modified for the sake of clarity.

Setting up multilingual menus in D7

Here are the prerequisite for this article:

  • A fresh & properly installed multilingual D7 website with Path prefix language code (e.g. "/en", "/fr", etc.).
  • An enabled Language switcher block. To configure this block, go to  en/admin/structure/block.

If you need help setting up your website, perhaps you should first read How to setup a multilingual website with Drupal 7. What I'll be covering in this article is how to create English-French bilingual menus. I'll be working from the English interface of my website. That's why you'll see a language prefix in each of the given URL (i.e. "en/..."). Alright, let's go!

Subscribe to RSS - tutorial