diff --git a/openy_gated_content.info.yml b/openy_gated_content.info.yml index 8388b8d31..4afb2131b 100644 --- a/openy_gated_content.info.yml +++ b/openy_gated_content.info.yml @@ -1,9 +1,9 @@ -name: Virtual Y Base +name: Virtual YMCA Base type: module -description: 'Virtual Y base module.' +description: 'Virtual YMCA base module.' package: "YMCA Website Services" -version: 1.7.1 -core_version_requirement: ^8 || ^9 || ^10 +version: 1.9.1 +core_version_requirement: ^9 || ^10 dependencies: - openy_system - openy_gc_auth diff --git a/openy_gated_content.module b/openy_gated_content.module index 6b2993c08..481227439 100644 --- a/openy_gated_content.module +++ b/openy_gated_content.module @@ -162,7 +162,6 @@ function openy_gated_content_preprocess_html(&$variables) { } if ($node->hasField('layout_builder__layout')) { - $variables['#attached']['library'][] = 'openy_gated_content/y_lb'; $variables['attributes']['class'][] = openy_gated_content_get_base_theme() . '-based'; $variables['attributes']['class'][] = 'openy-gated-content'; } @@ -688,3 +687,15 @@ function _virtual_y_select_block_field_after_build($element, FormStateInterface return $element; } +/** + * Implements hook_preprocess_HOOK() for block templates. + */ +function openy_gated_content_preprocess_block(&$variables): void { + switch ($variables['plugin_id']) { + case 'inline_block:virtual_y_app': + case 'inline_block:virtual_y_login': + $variables['#attached']['library'][] = 'openy_gated_content/y_lb'; + + break; + } +}