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? At first, it's not obvious. But after the usual searching spree, I found the perfect solution.

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!