Adding Font Awesome to Drupal Bootstrap subtheme

Need those awesome font-awesome fonts in your custom Bootstrap based Drupal theme? I know I do. Here’s how you do it. 1. Download Font Awesome http://fortawesome.github.io/Font-Awesome/ 2. Put the expanded folder in your theme’s folder 3. Add the preprocess html function … Continued

SEO checklist for Drupal

I frequently get asked by clients what can be done to Search Engine Optimize their Drupal site. Here’s a list of things that you should check to make sure that the technical foundation is in place for your site to … Continued

Notes from DrupalCon Portland, May 2013

Ok, so these are my raw notes from DrupalCon Portland. I doubt they will be of much use to anyone but myself. But this web site is mainly for my personal notes, so hopefully I will enjoy them. Notes from DrupalCon Portland … Continued

Convert node edit tabs to contextual links

function YOURTHEME_menu_local_task($variables) { $link = $variables[‘element’][‘#link’]; $link[‘localized_options’][‘html’] = TRUE; return ”.l($link[‘title’], $link[‘href’], $link[‘localized_options’]).’   ‘.”\n”; } function YOURTHEME_menu_local_tasks($variables) { $output = ”; if (!empty($variables[‘primary’])) { $variables[‘primary’][‘#prefix’] = ‘ ‘; $output .= drupal_render($variables[‘primary’]); } if (!empty($variables[‘secondary’])) { $variables[‘secondary’][‘#prefix’] = ‘ ‘; … Continued

CodeKit and Drupal is not defined

If you are working with compiled CSS such as LESS or SCSS (SASS) chances are that you’ve come across CodeKit. This app doesn’t just help you compile your LESS or SCSS files but is also sticking its’ nose into what’s … Continued

Syntax for using watchdog();

Using watchdog() in Drupal can be a good way of finding out what’s happening in the code your writing. Here’s a quick reminder and example of how it is used watchdog(‘debug’, ”. print_r($view, TRUE) .”);

A quick way to add og:image

A quick way for adding a specific opengraph image from your nodes is by adding this to the relevant node.tpl.php.  $imgpath = image_style_url(‘YOUR_STYLE’, $YOUR_FIELD[0][‘uri’]); $element = array( ‘#tag’ => ‘meta’, ‘#attributes’ => array( ‘property’ => ‘og:image’, ‘content’ => $imgpath, ), … Continued