Drupal

Drupal 8 Twig Templates and Translations

LeveLTen writes about their contributions to twig in Drupal 8. We can now say:

<p class="submitted">
{% trans %}
  Submitted by {{ author.username }} on {{ node.created }}
{% endtrans %}
</p>

Their contribution have made twig really usuable.

Select (or other)

The select or other module was just brought to our attention. As Danny explains:

Select (or other) let’s you provide an Other text field to a select list if the available options in this list do not contain what the user wants to select. It’s actually a pretty nifty module with quite a few options and its functionality can be used in multiple ways: you can use for content and webform fields and you can declare new instances in custom modules.

Definitely have seen this use-case, and no doubt we'll be using this module in the future at Xplain Hosting.

Theming in Drupal 8 - Conversion of themes to Twig

Drupal 8 is coming, and with it the biggest changes yet. One of them is a new theming engine. You can still use phptemplate. But if you want to switch, read Erstellt von Luca Stockmann post:

This post adds to the successful and popular "Theming in Drupal 8 with Twig?" (Part 1, Part 2) series from Steffen. It deals with converting Drupal phptemplate themes to use the new Twig template engine, like we recently did with our Busy theme. This is all for Drupal 8, so this might not be helpful to you just yet, but if you wanna get a headstart on converting your phptemplate theme to Twig, nothing's holding you back from starting right now!

Drupal 8 API freeze

Dries has announced the Drupal 8 API freeze.

I'm very excited about how Drupal 8 is shaping up; it will be a much more powerful and easier to use Drupal. While there is a lot of work ahead of us, I feel good about moving forward with the next phase of the Drupal 8 development cycle.

...

Currently, Drupal 8 includes backwards compatibility layers that support Drupal 7 APIs while we complete conversions of core modules to the new Drupal 8 APIs. An example is the routing support in hook_menu(), which will replaced by the Drupal 8 routing system. The Drupal 7 APIs are being marked deprecated in phpDoc, and contributed module developers should not use them because they will be removed prior to the Drupal 8 release.

The reason of the API freeze is that contributors can work on their modules, knowing the rug won't be pulled away under them.

Drupal 8 Module Development, Part 1: Getting Started

With Drupal 8 now in alpha release, LevelTen writes about Drupal 8 module development:

The old method of using .info files to initialize your module is going away in Drupal 8 and will be replaced with Symfony YAML(.yml) files. Old .info files will now become .info.yml files, and will look slightly different.

There are a lot of changes in Drupal 8. Probably the biggest disruption in Drupal for a very long time. But they are all welcome, and will solve some real world pains.

Drupal distributions - getting going faster

Greg Harvey writes about Drupal Distributions:

As an experienced Drupal developer I already knew about distributions, in fact I've made one or two, however it was great to see this talk and refresh myself on the latest approaches, see what the popular distributions are and also understand Simon's approach to distributions and why he sees them as vital to the developer workflow.

At Xplain Hosting we don't support distributions except only some. Hopefully at some stage we can give you the ability to pick any distribution you'd like. But that will be using git, not using subversion.

Thresholds, Code Freeze, Getting Features into Drupal 8, Criticals and Majors in Drupal

Cathy Theys blogs some important numbers on Drupal 8's status:

What are the threshold numbers? We want to be below 15 critical bugs, 100 major bugs, 15 critical tasks, 100 major tasks

There is the possibility for new features, when issues are under these counts:

Drupal and “Invented Here”

Mike Crittenden writes about The fear of writing your own code:

So you started with an accepted contrib module and added more and more crap on top of it until it became a big unmaintainable mess. We've all been in situations like this where a contrib module works except for this one thing or that other thing that you have to override or hack or add another module for, and you end up with a solution that you're not proud of and that you dread having to maintain, all because it seemed easiest to start with contrib.

What's the alternative?

It's simple, code it yourself. In the example above, make a custom menu callback that runs an EFQ for the nodes and spits them out in a custom template, and build your own form to do the filtering. It's no more work than a couple hours, probably less time than you would have spent screwing around in the Views API trying to get it to obey you, and you get a solution that you have full control over and that you don't have to be embarrassed by.

A timely post.

State of Drupal presentation (May 2013)

Dries Buytaert's state of Drupal presentation was just uploaded:

Two weeks ago at DrupalCon Portland, I gave my traditional State of Drupal presentation. A total of 3,500 were present at DrupalCon, a new record for DrupalCon attendance.

5 Responsive Themes for Drupal Commerce that Look Great

Danny Sipos shows five responsive themes for Drupal Commerce:

Continuing with my series of responsive theme round-ups, here are 5 beautiful Drupal commerce themes that you should definitely know about.

Worth having a look if you are in the market for a Drupal Commerce theme.