Skip to main content
ComputerMinds

Articles · Page 6

Drupal Planet

Drupal 8: Creating a custom field - Part 2: Field drupal widget

This is part 2 in my series of articles about Drupal widgets, and specifically creating a custom field. I recommend reading Part 1: Field type first, if you have not done so already.Read article →

Drupal 8: Creating a custom field - Using a custom field

Having written articles on how to create a Drupal 8 field type, field widget and field formatter I thought that now is the time to explain why you might want to create a custom field type. More specifically, why I have created a custom field.Read article →

Drupal 8: Creating a custom field - Part 1: Field type

I have been experimenting with the Alpha release of Drupal 8 and so I'm sharing some of my experiences so that you can avoid the pitfalls I have encountered.Read article →

Place blocks inside your content with EBA

Previously on this website I have written about rendering blocks programmatically and adding things to content to be managed alongside fields. It's time to combine the two! On many projects, we find ourselves needing to render a block consistently across all content of a…Read article →

You should use Entity cache

If you have a Drupal 7 site, then you should be using the Entity cache module, here's why:Read article →

Drupal Job Scheduler : Easily scheduling periodic tasks

Sometimes as a module developer you need to have some code execute periodically, like maybe every day or even once a week. This might be to optimise an external system, or pull in some external data or to compute some statistics every day etc. Drupal provides a very simple way…Read article →

Automated deployments using Aegir

There are a few write-ups about using Aegir to automate your deployment process notably one from Mig5: Zero-touch Drupal deployment with Jenkins, Aegir, Git, Fabric and Drush. I recently wanted to set this up for our own project, but felt like I could make some improvements.Read article →

Guard livereload

Livereload is one the coolest things to happen to frontend development in the last little while, and actually it can really speed up your work. Basically it re-loads your CSS (and Javascript some of the time) automatically as you make changes. You don't have to make a change…Read article →

Making the Flag Module's Confirmation form use AJAX

This article discusses how we can use a combination of techniques to take the standard 'Confirmation Form' provided by the Flag module and get it to load in a modal window rather than on its own page. We'll also extend this form slightly to allow the user to include some…Read article →

Render a block programmatically

This is a real quick one, but so useful! We often want to render a block within content, perhaps as part of a node (maybe in hook_node_view, and then made configurable like a field), but there's no obvious way to do this correctly for any block. Drupal normally renders its…Read article →

Creating Facebook Canvas Apps & Page Tabs

Facebook integration is obviously starting to become a de facto requirement with most web development projects. In most cases the requirements are reasonably straight forward and involve nothing more than including a ‘Like’ button on content, but what about actually adding your…Read article →

Custom add another

Drupal 7 fields are great, but using multiple valued fields and field collection you can quickly reach the point of having a form that looks like this:Read article →

Add stuff to a node and configure it like fields

UPDATE: The Extra Field and Extra Field Settings Provider modules facilitate doing this sort of thing in Drupal 8. Read on for older Drupal sites, and for the concepts behind this.Read article →

Quick tips: Adding an empty master branch

When I create a git repository for a new project on Drupal.org I don't bother to create a master branch, branches named 6.x-1.x or 7.x-1.x have special meanings and are the ones that we're encouraged to use. However, drupal.org doesn't allow us to change the default branch on…Read article →

Create a Drupal ajax link in Drupal 7 (it's easy)

In this example we have a table listing log entries of some kind. We want to put a delete link against each log entry allowing the administrator to delete the log entry:Read article →

Drupal Entity Token Module

The Entity token module is part of the Drupal Entity Module package, it provides lots of new tokens to use everywhere that tokens are currently available. It does this by being aware of the structure of fields on entities and exposing extra options for fields that reference…Read article →

Drupal Science Camp - The results

Drupal Science Camp was the first Drupalcamp in the UK of 2012. It was wonderfully organised by Rachel Lawson and Euan Bayliss at a magnificent venue provided free of charge by Napp Pharmaceuticals Limited.Read article →

Using the Drupal overlay for non-admin paths

Drupal 7 ships with a module called 'Overlay', it is installed by the standard install profile and actually is pretty great for most people. If you don't know what I'm talking about then, it's this:Read article →

Drupal Science Camp - 21st & 22nd January - Cambridge (UK)

If you are free on the weekend of the 21st and 22nd and are anywhere near Cambridge (the UK one!) then make your way to the Drupal Science Camp. The details on their website are a little sparse so far, but it's shaping up to be an interesting little event - plus ComputerMinds…Read article →

Monitoring Varnish

We put almost all of our Drupal sites behind the excellent Varnish HTTP accelerator, and it gives us a massive performance boost for most site visitors. However it seems to have a tendency to crash without warning and occasionally just dies, leaving our sites down.Read article →

Migrate sites from one Aegir to another

We recently needed to migrate all our sites on one physical server to another server, there were more than 200 sites, and they were all hosted with Aegir. The old server was to be decommissioned, so we had to move all of Aegir's data about the site to the new server import into…Read article →

Our top Drupal modules of 2011

As the year draws to a close we thought it would be appropriate to look back at an exciting year in for Drupal modules, and to list our top 5 Drupal modules of 2011. To qualify for the list the module had to have it's first release in 2011, and have a Drupal 7 version - other…Read article →

Rendering Drupal 7 fields (the right way)

(We have a Drupal 8 version of this article now too!)Read article →

Quick tips: Adding an existing project to a drupal.org sandbox

Most projects start with you trying out something locally, getting it working and then after some initial testing you might then want to publish the project on Drupal.org. Sandboxes are a great way to throw up some code and the perfect place to pop random code that others might…Read article →