Issue 3411132: Set the default image on teasers
1 unresolved thread
1 unresolved thread
Merge request reports
Activity
Filter activity
- Resolved by John Lutz
- Resolved by John Lutz
added 1 commit
- ad23a2d0 - Issue 3411132: Update image style to just be hardcoded. Remove dsm.
81 if (in_array($node_type, ['provus_news', 'provus_blog', 'provus_person'])) { 82 if (!$vars['node']->field_provus_media_image->target_id && $vars['view_mode'] != 'full') { 83 $default_image_name = 'default_' . $node_type . '.jpg'; 84 85 // Get the field display settins to get image style we need to render. 86 $display_options = EntityViewDisplay::load('node.' . $vars['node']->getType() . '.' . $vars['view_mode']); 87 if (empty($display_options)) { 88 $display_options = EntityViewDisplay::load('node.' . $vars['node']->getType() . '.default'); 89 } 90 91 if (!empty($display_options)) { 92 $display_options = $display_options->get('content'); 93 94 if (!empty($display_options['field_provus_media_image']['settings'])) { 95 $image_options = $display_options['field_provus_media_image']['settings']; 96 dsm($image_options);
Please register or sign in to reply