Created
November 15, 2016 16:13
-
-
Save jeremycaldwell/47b9ced3224acb349a821abb12980608 to your computer and use it in GitHub Desktop.
Print all values from array
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $teaser_images = ''; | |
| $teaser_images = field_get_items('node', $node, 'field_teaser_image'); | |
| if (!empty($teaser_images)) { | |
| foreach ($teaser_images as $teaser_image) { | |
| $path = $teaser_image['uri']; | |
| $alt = $teaser_image['alt']; | |
| $title = $teaser_image['title']; | |
| $nodeURL = 'node/' . $node->nid; | |
| $image = theme_image_style( | |
| array( | |
| 'style_name' => 'none', | |
| 'path' => $path, | |
| 'alt' => $alt, | |
| 'title' => $title, | |
| 'attributes' => array ('class' => 'fullimg'), | |
| 'width' => NULL, | |
| 'height' => NULL, | |
| ) | |
| ); | |
| print l($image, $nodeURL, array('html' => TRUE, 'attributes' => array('class' => 'special-offer-anchor'))); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment