Drupal 7
Printing or Rendering a Node Field or Profile2 Field in Drupal 7
Mike Milano — October 20, 2011 - 1:17pm
When overriding a node template or user profile, you should not be drilling down the field array and printing the output unless you have a very good reason to do so. i.e. (do not do this) print $node->field_zipcode['und']['0']['value'];
The Drupal 7 field api offers us the field_view_field() function to get a renderable array of the output for a field entity.
Colorbox: New Lightbox Module for Drupal 7
Mike Milano — April 10, 2011 - 10:53pm
I came across this module tonight since Lightbox2 wasn't updated to D7 yet.
It's pretty nice and I'm happy I ran into the problem that had me searching for new tools.
Drupal 7 Get Image Style Path
Mike Milano — September 8, 2010 - 11:24pm
Today I was working with the new image styles (imagecache) in Drupal 7.
I created a content type with an image field and needed to embed the image style path inside custom HTML for a JQuery slideshow. That was the reason I needed to get the path vs using the theme image function.
The trick was using image_style_url().
<?php $path = image_style_url('home_rotator', $node->field_slideshow_image[LANGUAGE_NONE][0]['uri']); ?>
