Skip to content
Snippets Groups Projects
Commit b5a0e78a authored by Eric Bremner's avatar Eric Bremner
Browse files

Fixing marketing block and header image to use new responsive image function

parent 87d815d5
No related branches found
No related tags found
No related merge requests found
......@@ -68,8 +68,12 @@ function uw_fdsu_theme_resp_preprocess_paragraph(&$variables) {
case "uw_para_marketing_block":
// Get the field entity from the paragraph.
$field = $variables['paragraph']->get('field_uw_marketing_image')->first();
// Set the responsive image variables.
_uw_fdsu_theme_resp_add_responsive_image_variables($variables, 'field_uw_marketing_image', 'uw_resp_is_marketing_item');
$sources = _uw_fdsu_theme_resp_add_responsive_image_variables($variables, $field, 'uw_resp_is_marketing_item');
$variables['sources'] = $sources;
$display_title = _uw_fdsu_theme_resp_get_field_value_from_paragraph($variables['paragraph'], 'field_uw_display_title');
......@@ -89,7 +93,11 @@ function uw_fdsu_theme_resp_preprocess_paragraph(&$variables) {
case "uw_para_sph_header_image":
_uw_fdsu_theme_resp_add_responsive_image_variables($variables, 'field_uw_sph_header_image', 'uw_resp_is_sph_header_image');
// Get the field entity from the paragraph.
$field = $variables['paragraph']->get('field_uw_sph_header_image')->first();
$sources = _uw_fdsu_theme_resp_add_responsive_image_variables($variables, $field, 'uw_resp_is_sph_header_image');
$variables['sources'] = $sources;
break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment