Craft CMS for Drupal developers

Zoltan Varady
4 min readMar 20, 2015

We’re a design and web development agency that primarily focuses on small businesses and NGOs. That means content heavy sites, with a few extra features sprinkled in. We rarely use templates or themes, we create the designs from scratch, hand code the HTML/CSS required, and then move that to a CMS.

We’ve been using Drupal for almost a decade now. It’s great in many ways — very extensible, with thousands of modules to choose from, and we code our own modules if we need to. The community is great. But for many of our sites, we needed little in terms of “interactive features”. On the other hand, we would struggle a lot beating Drupal’s default HTML output into the shape we need it to be. This would be a typical workflow:

  1. Figure out where this particular output comes from: a .tpl.php file? A theme function? A setting in the field display or views or panels interfaces?
  2. Figure out how to name and where to put the new template or theme override (often ending up with dozens of files named views-view-field — tab-promo-content — field-recommended-image.tpl.php or such)
  3. Realize you need another variable that’s not in the default template, dig into the preprocess functions and do a bunch of dpm()-ing to find the data you need
  4. Undo some of the default CSS styling by using stronger selectors, or figure out how to remove system stylesheets.
  5. Repeat for the next element you need changed.

So I was on the lookout for something we could use on these smaller sites to make our workflow easier. I’ve looked at static site builders like Jekyll or Statamic — but those weren’t really usable by our clients. I’ve looked at online services like Squarespace or Perch . I’ve looked at next generation CMS-es like Buckets, Respond, Apostrophe, October, Bolt and Keystone. They all had some great ideas and novel approaches, but failed on at least one of the basics:

  • Complete control over the HTML output.
  • Custom content types with custom fields. Having structured content is one of Drupal’s strengths, and I’m not going back to a single Wysiwyg box.
  • Multilingual support. We’re a hungarian shop, and 80% of the sites we do are in two languages. Drupal was shining in this area (and will be even better for Drupal 8). For many of the systems I’ve tested, languages are an afterthought, requiring theme hacks or even translating via javascript string replacement :O

I’ve even looked at Wordpress — but diving into it I found the same kind of cruft I was struggling with in Drupal. After finding half a dozen mutually incompatible translation solutions, and realizing the most popular field module just shoved everything into a serialized blob in the database, I gave up.

Then I came across Craft. Here’s the things I like about Craft:

  • content types and fields are built in
  • it was designed with multilingual support from the start
  • it has no default HTML output. Zero. Zilch. Nada. You build your templates in Twig, and fetch content using the Craft API. If you are working the way we are, building static CSS/HTML pages first, it’s great news. Just copy your HTML, sprinkle in some Twig, and you’re done, the design hasn’t moved a pixel.

Now, a disclaimer: Craft is not free, and it’s not open source. It’s an one-time license per domain, and all updates are free after that. It’s built upon the open source Yii framework — a PHP MVC framework that’s MIT licensed, and that allows building closed source solutions upon it.

I’ve been using open source tools since I’ve started developing, so this is a big change for me. I have to admit though that there’s a very clear focus for this product, and has a level of polish I haven’t found in FOSS projects.

It doesn’t have a lot of features, just the basics, but it does them very well. The admin interface is clear, the API is easy to pick up, the documentation is well maintained. All of these make it a joy to work with.

Craft-Drupal glossary

Craft uses a lot of the same concepts as Drupal, but the terminology is different. Here’s a glossary that could help:

Entry ~ Node
Entry type ~ Node type
Element ~ Entity
Element type ~ Entity type
Channel ~ View (in that a channel is a list of entries)
Structure ~ Book (organize your content in a tree)
Single ~ one-off page, something you’d use Panels for or a custom page.tpl.php
Image transform ~ Image style
Matrix field ~ this field type is powerful and can do many tricks. Use it to get multiple-value fields (most Craft fields are single value only, with the exception of assets and tags), blocks of fields like in Field Collection, or as a way to build complex content, something that you’d use Paragraphs or Panopoly’s panes for.

Get started with Craft

We’re on our third Craft project right now, and so far it’s been a good experience. A couple of links and tips to get you started:

--

--