I love CiviCRM, but sometimes visualising and 'reporting' on data can be a complicated process and personally I think the Drupal Views module is a perfect way of easily generating listings and reports that can be filtered, sorted and manipulated on the fly by non-technical users.
Currently, Views intergration is pretty good but there's more work to do and I'm taking over the views maintenance of CiviCRM, to not only fix bugs, but also add enhahncements and features.
Let me know what you're looking for either in the comments or by creating an issue and tagging it 'views3' and we'll see what we can all accomplish.
There are times when doing Drupal development when you need to run a custom PHP script, maybe moving data from one field to another, that doesn't warrant the time and effort to create a custom module. In this scenario, it would be quicker to write a .php script and bootstrap Drupal to gain access to functions like node_load() and db_query().
To bootstrap Drupal, you would need to add some additional lines of code to the stop of your script. Something like:<?php // Bootstrap Drupal. $drupal_path = $_SERVER['DOCUMENT_ROOT']; define('DRUPAL_ROOT', $drupal_path); require_once DRUPAL_ROOT . '/includes/bootstrap.inc'; drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); // Do stuff. $node = node_load(1);
The script would need be placed in the root of your Drupal directory, and you would then have had to open a browser window and visit http://example.com/foo.php to execute it. This is where the "drush script" (or "drush scr" for short) command is useful, and can be used to execute the script from the command line.$ drush scr foo.php
It also means that I no longer need to manually bootstrap Drupal, so my script is much cleaner.<?php // Just do stuff. $node = node_load(1);
I prefer to keep these scripts outside of my Drupal directory in a separate "scripts" directory (with Drupal in a "drupal" directory on the same level). This makes it easier to update Drupal as I don't need to worry about accidentally deleting the additional files. From within the drupal directory, I can now run the following command to go up one level, into the scripts directory and then execute the script.$ drush scr ../scripts/foo.php
If you commonly use the same scripts for different projects, you could also store these within a separate Git repository and checkout the scripts directory using a Git submodule.Tags:
Contrib Search maintainers are committed to make Drupal 8 kick ass with Search API.
Search is a massively cool technology spectrum with loads of really tough problems such as language stemming, delivering search as a site scales and helping customers actually find what they want. However, solving these is not so easy. Let’s look at the history of Search and Solr in Drupal.
I'm turning 35 today. 35 is a weird age. It feels like a milestone birthday; like I'm turning the corner into adulthood for good. Turning 35, it seems, is not without complications. I feel like I became part of the old folk whose cool is threatened by youngsters. Anxious, as I've so much left to achieve and experience.
And yet, I am following my passions and there is not much more I'd want. People have asked me what I'd like for my birthday. I'd love it if you gave me one of the following two things:
With some CMSs such as Joomla, menus are very powerful features. They can control layouts, permissions, metadata and much more.
In Drupal, menus have almost no power at all. By default, menus are not capable of controlling much more than the destination of their link.
So, we end up with a lot of questions about menus. This week a member asked us how they control who can see menu links. This tutorial is our answer.
We're going to show how Drupal menu permissions work and how you can make them more powerful.
If widgets aren't enough, then you can always use Twitter's REST API to build custom functionality.
Drupal has a bunch of contributed modules that make it easy to integrate Twitter into Drupal.
In this article, I'll show you a few popular modules that can help you add embedded widgets and access Twitter's API from within Drupal.