Define Text Format in Drupal Migrate Field Mappings

In migrate, defining a text format for a mapped field is fairly straightforward. $this->addFieldMapping(‘field_about_us:format’) ->defaultValue(‘full_html’); What we’re doing in the example above is mapping the default value “full_html” to the “format” subfield of the “field_about_us” field. This essentially sets the text format to full_html for data migrated into our content type. More field-mapping specific information… Continue reading Define Text Format in Drupal Migrate Field Mappings

The Singularity is Here

I recently decided to quit jumping from responsive grid to responsive grid in hopes of finding the perfect grid that solved all my problems and filled the void left by a number of other grids used in the past. I made this decision, because for the most part the previous grids I tried all did… Continue reading The Singularity is Here

Search Krumo–Seconds (if not Minutes) Off your Day

In this post I’m assuming you’ve used the Drupal Devel module and Krumo to inspect or debug your arrays using dpm() in a more user-friendly manner than printr() or vardump(). If you have not used Devel and regularly debug Drupal arrays, stop everything you’re doing and check it out. The Search Krumo module adds a search field… Continue reading Search Krumo–Seconds (if not Minutes) Off your Day

Google Drive now offers a simple way to save files

Yesterday Google introduced an easier way to save files to Google Drive. For users, it’s as easy as clicking a ‘Save’ button identified by a Google Drive logo and for site owners, it’s as easy adding a bit of HTML and a short script. <script src=”https://apis.google.com/js/plusone.js”></script> <div class=”g-savetodrive” data-filename=”My Statement.pdf” data-sitename=”My Company Name” data-src=”/path/to/myfile.pdf”> </div>… Continue reading Google Drive now offers a simple way to save files

Using the PHP-Drupal Textmate Bundle to Automatically Apply Coding Standards

When contributing to an open source project as large as Drupal, it’s important to comply with the community’s coding standards for a variety of reasons: It helps maintain consistency in the code base. It reduces the time for submitted patches to get tested and accepted. It makes the code easier to debug and maintain. It… Continue reading Using the PHP-Drupal Textmate Bundle to Automatically Apply Coding Standards

Accessing Field Values in Drupal 7 Using field_get_items()

There are two great ways I’ve found to quickly access an entity’s field values in a Drupal-friendly way. Both of these approaches assume that you know the type of entity you’re working with and that you already have your entity loaded into a variable available to you. This week I’ll be focusing on the handy… Continue reading Accessing Field Values in Drupal 7 Using field_get_items()

Improve Your SEO for Events by Adding Rich Snippets

When google indexes a website, it does its best job to try and interpret and categorize the type of data it finds so that it can serve accurate and relevant results to everyone using its search engine. However, you can greatly enhance google’s accuracy by providing it additional data about your data (i.e. metadata, which… Continue reading Improve Your SEO for Events by Adding Rich Snippets