Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Function to build the banner block
- */
- function sbs_feature_programma_banner() {
- $program_subsite = sbs_subsites_get_programme();
- $image_output = '';
- if ($program_subsite) {
- $image = field_get_items('node', $program_subsite, 'field_programma_banner');
- if ($image) {
- $image_output = field_view_value('node', $program_subsite, 'field_programma_banner', $image[0],
- array(
- 'type' => 'cs_adaptive_image',
- 'settings' => array(
- 'styles' => array(
- 'breakpoint_1' => 499,
- 'style_1' => 'programma_banner_small_phone',
- 'breakpoint_2' => 767,
- 'style_2' => 'programma_banner_phone',
- 'breakpoint_3' => 1079,
- 'style_3' => 'programma_banner_tablet',
- 'max_style' => 'programma_banner',
- 'fallback_style' => 'programma_banner',
- ),
- ),
- )
- );
- }
- }
- return $image_output;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement