Skip to content

Commit

Permalink
Reusable inline blocks don't have the inline_block plugin.
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkshout-ci-bot committed Jul 31, 2024
1 parent 3ac718b commit 468dd8a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion themes/custom/ts_wrin/ts_wrin.theme
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,15 @@ function ts_wrin_preprocess_block(array &$variables) {
$variables['white_logo'] = \Drupal::service('file_url_generator')->generateString($logo_path);
}

if ($variables['plugin_id'] == 'inline_block:person_listing') {
if (
$variables['plugin_id'] == 'inline_block:person_listing'
||
(
isset($variables["content"]["#block_content"]->type->target_id)
&&
$variables["content"]["#block_content"]->type->target_id == 'person_listing'
)
) {
$variables["content"]["field_featured_experts"]["#title"] = $variables["elements"]["#configuration"]["label"];
}
}
Expand Down

0 comments on commit 468dd8a

Please sign in to comment.