Search API: indexing nodes including comments

Drupal Search

When you use Search API (and you should because core search sucks) and you want to index nodes with comments you might get stuck because comments are not a related field which is available. This is weird you might think, but luckely, this entity API patch fixes this "relationship" and makes it instantly available via search API fields. Other options are writing your custom field using hook_entity_property_info_alter

TWIG in Drupal 8: getting started


TWIG is in core for Drupal 8. However the core themes (bartik, seven, stark) aren't converted yet, and you won't find any .twig templates in the current 8.x-dev. The theme conversion is taking place in a seperate Drupal 8 Twig sandbox. A great deal of explanation is done on that project page and under the "Get started" section. Basically, all these issues have to be done. Also, for more background info, check out the video about Twig in DrupalCon Sydney. Will phptemplate still exist in Drupal 8? For now it seems so (correct me if I'm wrong), but I guess that might change until code freeze based on the amount of progress.

Drupal 8 progress update

Dries thinks Drupal 8 won't come out until the end of this year (source) but if  you wan't to get it out there sooner, check out the Drupal 8 progress overview page. Or check this page for all Drupal 8 changes so far. Chx's blog has got some insightful posts on D8 progress as well. And if you are a module maintainer, you can already start converting your module!

XHR2 uploads using Drupal ajax framework

Drupal XHR2 upload ajax

I wanted to use the XMLHttpRequest level 2 capabilities which modern browsers support to create an easy way of uploading (multiple) files in Drupal. You know, the kinda way Gmail and now also Facebook do it. While this isn't that hard to use standalone (HTML5 demo here), it was quite a challenge implementing this using Drupal 7's ajax framework. Finally, with special thanks to rudiedirkx, a way to do this was found by overriding Drupal.ajax.prototype.eventResponse. See the whole solution on stackexchange.

CKEditor 4

CKEditor 4.0 was officially released last week!  The -dev version of the CKEditor module supports the new editor (d.o issue) but it doesn't support all new features yet, like inline editing. Meanwhile, another CKEditor module was just released by quicksketch who is also getting work done on using CKEditor as a core WYSIWYG editor in Drupal 8 (as an alternative to Aloha). 

Clustered maps with OpenLayers

An openlayer map with clustered points

Maps in Drupal are easy with Openlayers, but when you start displaying thousands of points on a small area, things get messy. One popular solution is to display points clustered on lower zoom levels and have them split up when zooming in on a cluster of points. The AnimatedCluster library will help you out here, and there even is a sandbox module for OpenLayers integration.

Preparing for Windows 8

Windows 8 Drupal tile

Windows 8 ships with IE10 which might be the first version which catches up with other browsers in terms of HTML5/CSS/SVG/JS support. But more importantly it might also be big step for us developers. One of Win8 features is the "pin" ability. It's pretty easy to implement in existing sites. More advanced features include building "live tiles" which are actually apps. You can find an extensive Windows 8 review at the Verge. Are you ready for Windows 8?

Drupal inline editing with Raptor

Drupal raptor editor

Raptor is a new HTML5/JQuery UI editor, with some nice features and a GPL license. Inline editing allows for some great usability improvements and is being developed as part of the Spark project. The choice of WYSIWYG editor in Spark is Aloha (Raptor was considered but didn't make the cut). However I'm really charmed by the Raptor editor and built a quick Drupal (sandbox) module for it. Mostly as a proof of concept, but it works!

Drupal Sublime snippets

Drupal Package Sublime Snippets Autocomplete

If you use the Sublime 2 text editor (I'm still using it despite all the buzz around phpStorm) you might want to check out some packages, who are available throught the unofficial Package Manager. Now, search for "Drupal" through the install package command pallette, and you will get three packages that are available. I recommend the first one, which offers snippets for all Drupal functions.


We're back!

We're back from Münich after a great DrupalCon week. Check out our full article roundup with some of the highlights.


Subscribe to Merge Drupal Blog


This is the company blog of
Drupal specialist

We are located in Breda (Netherlands) and build websites using Drupal. More about us.

Content on this blog is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Netherlands License.

Creative Commons License

Recent Comments