Skip to content
Snippets Groups Projects

Issue 3411132: Set the default image on teasers

Closed Rachel Jaro requested to merge issue/provus-3411132:issue-3411132-default-image into 2.1.x
1 unresolved thread

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • John Lutz
  • Rachel Jaro added 1 commit

    added 1 commit

    Compare with previous version

  • Rachel Jaro added 3 commits

    added 3 commits

    • 4b882632 - 1 commit from branch project:2.1.x
    • 8ca3811e - Issue 3411132: Set the default image on teasers
    • f12c7299 - Update default style

    Compare with previous version

  • Rachel Jaro added 3 commits

    added 3 commits

    • e9cda8bb - 1 commit from branch project:2.1.x
    • cee194ac - Issue 3411132: Set the default image on teasers
    • 31820dd8 - Update default style

    Compare with previous version

  • John Lutz added 1 commit

    added 1 commit

    • ad23a2d0 - Issue 3411132: Update image style to just be hardcoded. Remove dsm.

    Compare with previous version

  • 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);
  • John Lutz approved this merge request

    approved this merge request

  • John Lutz added 2 commits

    added 2 commits

    • ea58f939 - 1 commit from branch project:2.1.x
    • 9176cbcc - Merge branch provus:2.1.x into issue-3411132-default-image

    Compare with previous version

  • Closing this mr because the tugboat instance is gone.

  • closed

  • Please register or sign in to reply
    Loading