Article
Posted on 9th August 2018
Takes about 3 mins to read

The Problem I imagine many of us have been there: there’s some CSS class in your markup, and you need to do something with it. Maybe you want to remove it, change it, or perhaps alter its style declarations. “Easy peasy,” you think, “I’m a developer. I got this.” And so you should. Next, if you’re anything like me, your first instinct is to fire up your search tool of choice and search your...

Article
Posted on 11th June 2018
Takes about 3 mins to read
This article is part of the series
Rebranding ComputerMinds

I volunteered to carry out the migration for the new ComputerMinds site as migration was one of the very few areas of Drupal that I hadn’t delved into thus far. With Drupal 8 becoming more and more popular, now was a great opportunity to learn the migration ropes. Luckily, Drupal 8’s migration has greatly improved since Drupal 7 so my life was made somewhat a little “easier”! This article will be aimed at some of...

Published in: #Drupal 8 #Migrate #code #yaml #Drupal Planet
Article
Posted on 4th May 2018
Takes about 1 min to read

A super quick blast from the past today; a Drupal 7 based article! I had some work recently to create a new "setting" variable for one our Drupal 7 multilingual sites, which meant creating multilingual versions of those variables. I soon found out that there is very much a correct way - or order - to achieve this as I got this one very wrong (I had to re-instate my DB!). So here I am...

Article
Posted on 17th April 2012
Takes about 13 mins to read

This article discusses how we can use a combination of techniques to take the standard 'Confirmation Form' provided by the [Flag][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 additional data before clicking 'Confirm'. As an example we'll use the Flag module to create an 'Abuse' flag that will apply to a comment entity...

Published in: #Drupal Planet #Drupal 7 #code #ctools #flag #modal
Article
Posted on 22nd March 2012
Takes about 1 min to read

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 blocks per region, so there is no single function to embed a block. I came across this really simple solution by Damien Tournoud in a...

Article
Posted on 19th July 2011
Takes about 1 min to read

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 find useful or a project that you just don't want to maintain. If you go and create one on Drupal.org then you'll get helpful instructions for...

Published in: #Drupal Planet #git #code
Article
Posted on 20th September 2008
Takes about 1 min to read

Small one this to compliment our other article on removing tinymce from select textareas. This enhancement will hide tinymce from the Drupal block edit screen when the input format is set to PHP. This stops the problem of tinymce stripping the PHP tags from the block edit textarea when you edit your block The following function goes into your template.php file and will solve the problem of tinymce showing up on a block when the...

Published in: #code #Drupal Planet #tinymce