Two web artists. One amazing company.

Articles tagged: Drupal

Styling Bootstrap 3 Buttons in Drupal 7

from Sarah Prasuhn on June 2, 2015 03:20pm


One of the greatest differences between Bootstrap 2 and Bootstrap 3 is the out of the box look and feel. Bootstrap 2 had a lot more pre-built colors and states, whereas Bootstrap 3 is a little more barebones.

So we're going to cover adding the class to integrate the basic default buttons, and then in Part 2 cover how to implement some more pre-built styles the colors, and sizing etc.

Like most frameworks you just add the class of course...but where?

Read more

Web-Consulting's Dirty Little Secret

from Sarah Prasuhn on April 9, 2015 01:05pm


It's the day after a launch and your client calls you in a sheer panic. Traffic is not as high as they'd like! Why aren't their new social media features paying off? Don't you know what you're doing? And to top it all off the site is slow! You need to fix this now.

As you listen to your client yell, you drift back in time to that first meeting where you both are posturing and laying down the ground rules for each other. Business as usual planning out the new details with excitement and anticipation.

And then the moment comes back to you. The moment when you said nonchalantly, "We can do that feature, but it may cause the site to slow down. Why is this feature so important?" And the client, also nonchalantly said, "We just need it, our competitors all have it." And you both went back to going over the other features on the list, not realizing that you had just wasted thousands of your client's dollars and hours of your life on something that most users don't give a flying flip about bringing almost zero value to the world, all because everybody's doing it. This is how the business just works, and hardly anyone ever questions it.

Read more

Knowing when to use content types and when to use custom entities

from Michael Prasuhn on April 3, 2015 07:15am


Ever catch yourself staring at your editor? Then switching over and staring at the content types overview of your new Drupal site? Then back to the client requirements? And then doing it all over again and again while you face a decision? Drupal content types and fields vs. custom entities. That's the tough decision. The choices you make here will affect almost part of site building to come, but it's so hard to know which to choose.

On one hand, Drupal fields are getting better, faster and more flexible all the time with better integration with contributed modules like views. But at the same time the new entity API with Drupal 7 is more flexible than ever, allowing you to add fields to even your own custom entities. So which route should you go? How can you make a decision like this without second guessing yourself all the time?

Why getting it right is important

While lots of projects can go either way the downsides can make the difference between a successful web project and a maintenance or performance nightmare. Using content types and fields with a complex data model that requires lots of complex queries can hurt performance, but using custom entities when you don't need them can add a maintenance burden when it comes time to upgrade your site or make changes. So how do you make that decision?

Read more

A cheat sheet for hook_entity_api()

from Michael Prasuhn on March 26, 2015 11:10am


The worst time to read software documentation is when you're trying to fix something that is broken and you have no idea why. I'd say it's like shopping when you're hungry, but it's actually the opposite. When stuff breaks for no apparent reason and you're on edge it's easy to notice every little issue with the docs, and you instantly form a very strong opinion on documentation.

The good news is that as a Drupal developer, you have tons of awesome documentation just a click away on or and contributed module documentation is better than ever. Even though almost everything you could ever want to know about Drupal internals is available on (even the source code!) sometimes you need to combine that with contributed docs, or dig in a little deeper.

That's exactly what I had to do while working on the first few chapters of Model Your Data with Drupal. Hooks like hook_entity_info() are well documented on, but the Entity API module adds it's own options to the mix. Entity API has great docs on it's options as well, but there isn't a lot out there that thoroughly documents them together, or the interaction of their options.

Read more

All about that trace, 'bout that trace

from Michael Prasuhn on March 19, 2015 09:25am


No one likes debugging code when it breaks and you can't figure out why it's broken. That piece of code might have been hard enough to write in the first place, or maybe it's a snippet that "should work" from a coworker, or maybe the documentation is missing, or maybe.... But what if you've checked, double and triple checked, and it's still not your code, it's something else in the system – code you're calling out to, or something that is calling your code – what do you do then?

Enter the backtrace, (also known as stack trace, or just trace). A powerful weapon in any software developers toolkit, it is more and more useful as the software you develop grows in complexity (Drupal 8 anyone?)

Read more

3 Pro-Theming Tips for Drupal 7

from Sarah Prasuhn on February 26, 2015 10:00am


Most developers know how to do these, but a lot of people follow the temptation and skip them in the rush to go live.

These simple steps reassure future developers and clients that you know what you are doing, subsequently increasing your value with just a few minutes of work.

All which means you can charge more and book more clients, both of which lead to the ability to do more of the things you love that are just for fun!

Read more

Why you should ALWAYS have a troubleshooting guide

from Sarah Prasuhn on February 11, 2015 04:40pm


Your demo is in 4hrs. 4 hours! The issues you have left could take that much time, not even counting pushing the changes and hoping it doesn't break the dev site.

Oh, and did I mention...your design changes aren't showing up. So you can't fix anything right now. ANYTHING! You haven't changed an issue to DONE in over an hour.

You've tried everything.

Save. Reload. Save. RELOAD AGAIN. What could it be?

Read more

7 Things for Troubleshooting Drupal 7 Theming

from Sarah Prasuhn on January 28, 2015 11:05am


When I worked in Reality TV Post Production I always had a troubleshooting guide. Most of the time I was working the night shift, and trust me no matter how many times you've done something sometimes your brain just breaks at 2am.

In case you haven't done this before a troubleshooting guide is basically just a list of the steps you take when things break, it helps you avoid that moment of exasperation 3 hours later when you realize how simple the solution really was.

Read more

Subscribe via RSS