Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2014
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.98 KB | None | 0 0
  1. /**
  2.  * Function to build the banner block
  3.  */
  4. function sbs_feature_programma_banner() {
  5.   $program_subsite = sbs_subsites_get_programme();
  6.   $image_output = '';
  7.   if ($program_subsite) {
  8.     $image = field_get_items('node', $program_subsite, 'field_programma_banner');
  9.     if ($image) {
  10.       $image_output = field_view_value('node', $program_subsite, 'field_programma_banner', $image[0],
  11.         array(
  12.           'type' => 'cs_adaptive_image',
  13.           'settings' => array(
  14.             'styles' => array(
  15.               'breakpoint_1' => 499,
  16.               'style_1' => 'programma_banner_small_phone',
  17.               'breakpoint_2' => 767,
  18.               'style_2' => 'programma_banner_phone',
  19.               'breakpoint_3' => 1079,
  20.               'style_3' => 'programma_banner_tablet',
  21.               'max_style' => 'programma_banner',
  22.               'fallback_style' => 'programma_banner',
  23.             ),
  24.           ),
  25.         )
  26.       );
  27.     }
  28.   }
  29.  
  30.   return $image_output;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement