DrupalDork.com was shut down on September 18, 2013. This is just a snapshot of the site as it appeared then.

Drupal Planet

Display Suite in Drupal 7

Display Suite for Drupal 7 included a lot of updates. The big ones are the inclusion of the previously-separate Node Displays and Views Displays modules, and support for more region layouts (the D6 version had a single pre-defined layout).

The feature that's making my life easy today, though, is a little thing: positioning the node post date separately from the node author. This was an option in D6 too, and I knew the module could still do it, but could not for the life of me figure out how. On the Manage Dislpay tab for my content type, my only options were the node body and taxonomy fields.

So, for your reference and mine: Display Suite fields only become available once you choose a layout under "Layout for [node type] in default" on the Manage Display tab.

I have a feeling I'll forget this step in the future, but hopefully I'll remember to look here for the solution!

Tags:

Xdebug, var_dump, and nested arrays

Xdebug is a must-have for local development, giving you step-through debugging and nicely formatted error messages, among other things. One of the mixed blessings it brings is that it overrides var_dump(). The display is a little nicer than the default, but it also cuts off at the third level of nested arrays or objects. This cuts the legs out from under Drupal developers: everything in Drupal uses nested arrays, and if you're trying to debug a problem or figure out where some data is stored, chances are good that you'll need to go five or six levels deep into an array to find your answer. Thankfully, the Xdebug developers were kind enough to include a configuration settings for this: xdebug.var_display_max_depth. You can increase the depth limit by adding a line to your php.ini file. I bumped the limit to 10 on my machine: xdebug.var_display_max_depth = 10

Updating Drupal Core with Drush

(Originally posted on BrockBoland.com.)

Sometimes I want to update the Drupal core without updating all the modules and themes I have installed. By default, drush up will update everything, but that's not what I wanted to do today. This seems like the kind of thing that would be easy to find on Google, but no such luck. So, for the benefit of the next drush newb:

drush up drupal

Makes sense, right?

Adding A Field Formatter to Display Suite

(Originally posted on BrockBoland.com.)

On one of my current projects, I'm using Display Suite to layout various node displays. This is only the second time I've used DS and I haven't needed to get too deep into it, but so far, I'm finding it to be a lot quicker than coding different versions of node.tpl.php - and it allows the site admins who will maintain the site to modify things without getting into the code, something I talked about last week. Panels is another very popular option for things like this, but the one time I used it, I wasn't too impressed; for whatever reason, it just didn't click for me.

Tags:

Coded vs. Configurable, and Too Many Options

(Originally posted on BrockBoland.com.)

I have always felt that a site admin should have the option to disable or change functionality without having to hire a coder to do it for them. In my early days of web development, this meant I produced pages and pages of admin options. Instead of being highly customizable for the user, these apps were just highly confusing.

Lullabot Module Development Deep Dive Week

(Originally posted on BrockBoland.com.)

Tags:

Pages

Subscribe to RSS - Drupal Planet