Latest shorts

Manualy overriding default rules and views on feature enable

Manual override

Features is a great tool but has its limitiations. For one, you can't easily add stuff like views and rules which are already in code and provided by other modules.

Commerce for example extensively uses default views and rules. One workaround is to clone the rule/view and add that one to your feature. But then you would like to disable the original one or you end up with duplicate entries. A nice way to do this is with some custom code in your features .module file (which is mostyl empty and features will never override it).

See the 'disable rule on feature enable snippet' here.

DrupalJam 2013

DrupalJam 2013 - Drupal Beyond the Code

Get your tickets for DrupalJam 2013 (17/5) - the biggest yearly Dutch Drupal event. This year's Drupaljam, located at 'De Kuip' in Rotterdam, will also include sessions 'beyond Drupal' by inspiring people who aren't necessarily members of the Drupal community.

Look beyond your own backyard and expand your horizon! Also, we are bronze sponsors this year.

Getting your styles right

Styling done right in Drupal means you need to style the system, not individual pages/designs, allowing for a DRY set of styles which keep your site lean and mean. But it can be difficult to find all UI elements which are used throughout Drupal. A handy module which makes this a lot easier is styleguide. It renders a page with all core style elements, buttons, tables, lists, forms and whatever you have, making the life of a themer that much easier. Oh, and by the way, did you see the Drupal 8 proposal for the Seven theme style guide?

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

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?

Pages

Latest article

How namespaces/PSR-0 got in Drupal 8

php code

At time of writing, Drupal 8 is still at least 6 months away. But there are already quite a lot of examples available how things are going to look. One of the things which is going to change is the way PHP code is written. Drupal 8 will use namespaces and PSR-0 as a standard and will large follow common PHP conventions for OOP code.

Subscribe to Merge Drupal Blog

About

This is the company blog of
Drupal specialist Merge.nl

We are located in Tilburg (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

Social