Kevin's Blog

All blog entries reflect the opinions of the author and have not been expressly endorsed by the Ivan Allen College of Liberal Arts or the Georgia Institute of Technology.

Customizing CKEditor in Drupal 7 and 8

Submitted by Kevin on Tue, 06/20/2017 - 13:21

Having worked on new ways of doing layouts with the Paragraphs module and worked with Institute Communications on the development of a new version of the Georgia Tech web theme, I realized that there was still one component of website visual design that I had yet to address:  a visual building block toolkit for content creators and editors.  Custom layouts are a part of this puzzle, but they do not address the need for custom styled headings, buttons, introductory text, etc. that need to be part of the actual content of a page.

The challenge here is that you want to make these custom styles easy to use and easy to maintain.  The most obvious approach is to add them to your chosen WYSIWYG editor, but figuring out how to do that can be tricky.  Here at Georgia Tech we use Drupal and in turn the preferred Drupal editor, CKEditor.  This is helpful, as there are lots of guides out there for extending both Drupal and CKEditor, but it can take time to dig through them and figure out how to make it all work.

Drupal 8.1 Migration - Not Quite There Yet

Submitted by Kevin on Fri, 04/29/2016 - 17:41

With the announcement that the Migrate modules were being included in Drupal 8.1 (albeit as experimental modules), I thought it would be worth giving them a try against a moderately small site just to see how well they work.

First of all, Migration is going to be a very different process from anything you may have done in the past to go between Drupal major versions.  It's very important to read the basic instructions, which I'll summarize here:

Drupal Paragraphs Module: The Holy Grail?

Submitted by Kevin on Tue, 12/29/2015 - 20:14

After a vendor recently delivered a site to us built in Panels that I found to be unbelievably confusing to try to work with, I went off searching once again for the Holy Grail of Drupal - a module that can actually make it easy for a non-technical content manager to create and maintain moderately fancy page layouts.  Fortunately, I didn't have to look far, as a former co-worker pointed me to a wonderful little diamond in the rough called Paragraphs.  This module doesn't look like much at first, but it really has some nice power under the hood once you figure it out.  I guess it's just par for the course that a module like this one would have the same steep learning curve as Drupal itself.  So, in today's blog post, I'll try to unravel the mysteries of this marvelous module and provide a quick tutorial to get you started.

Drupal 7 to 8 Module Conversion

Submitted by Kevin on Thu, 10/01/2015 - 19:21

All blog entries reflect the opinions of the author and have not been expressly endorsed by the Ivan Allen College of Liberal Arts or the Georgia Institute of Technology.

The following was developed using Drupal 8 Beta 15, so a lot of things could still change. The first Release Candidate of Drupal 8 is expected in mid-October 2015, and at that point the API interfaces should be frozen. In the meantime, your mileage may vary, and the author makes no guarantees about anything below actually working in later versions of Drupal 8.

On hearing that the Drupal team is now supporting Drupal 8 beta to beta upgrades, I thought it was time I took a look under the hood and tried to convert at least one of my Drupal 7 modules over to work with Drupal 8.  That was quite an experience, but I'm happy to say I got it working, though the core Drupal coders would probably not be happy with the way I kludged a few things in the end ;-)  Since then, I've converted two more modules, not without a few bumps in the road along the way, but I do have all three working properly now.

Drupal Blocks and Contextual Menus

Submitted by Kevin on Wed, 09/02/2015 - 18:40

All blog entries reflect the opinions of the author and have not been expressly endorsed by the Ivan Allen College of Liberal Arts or the Georgia Institute of Technology.

Time for a tech-heavy post about making Contextual Menus work even better for blocks generated by a custom module.

Why does this matter?  If your block is displaying information pulled from elsewhere in your Drupal ecosystem, it's very helpful if your site's content manager can easily get to the content that drives that block.  Otherwise, it becomes the guessing game of "Where did this content come from?", especially when months or years have passed since the module was built.

The real beauty of this technique comes when you have a number of custom module-generated blocks on a landing page, and you can then hover over that contextual menu on any of them and jump right to the data source. Suddenly, maintaining the data on that page has become ten times easier than it was before.