diff --git a/profiles/wcm_base/modules/custom/ocio_landing_page/ocio_landing_page.features.conditional_fields.inc b/profiles/wcm_base/modules/custom/ocio_landing_page/ocio_landing_page.features.conditional_fields.inc index c6e221c124f2db97d052b4e529769dff6d0be1c9..f0efa077b721a1a7f4566377a4c01bdd560b2f85 100644 --- a/profiles/wcm_base/modules/custom/ocio_landing_page/ocio_landing_page.features.conditional_fields.inc +++ b/profiles/wcm_base/modules/custom/ocio_landing_page/ocio_landing_page.features.conditional_fields.inc @@ -18,7 +18,7 @@ function ocio_landing_page_conditional_fields_default_fields() { 'options' => array( 'state' => 'visible', 'condition' => 'value', - 'grouping' => 'OR', + 'grouping' => 'AND', 'effect' => 'show', 'effect_options' => array(), 'element_view' => array( @@ -44,6 +44,13 @@ function ocio_landing_page_conditional_fields_default_fields() { 3 => 0, 4 => 0, ), + 6 => array( + 1 => 1, + 2 => 2, + 5 => 0, + 3 => 0, + 4 => 0, + ), 5 => array( 1 => 1, 2 => 2, @@ -58,14 +65,14 @@ function ocio_landing_page_conditional_fields_default_fields() { 3 => 0, 4 => 0, ), - 7 => array( + 8 => array( 1 => 1, 2 => 2, - 5 => 0, + 5 => 5, 3 => 0, 4 => 0, ), - 6 => array( + 7 => array( 1 => 1, 2 => 2, 5 => 0, @@ -94,6 +101,10 @@ function ocio_landing_page_conditional_fields_default_fields() { 1 => 1, 3 => 0, ), + 6 => array( + 1 => 1, + 3 => 0, + ), 5 => array( 1 => 1, 3 => 0, @@ -102,11 +113,11 @@ function ocio_landing_page_conditional_fields_default_fields() { 1 => 1, 3 => 0, ), - 7 => array( + 8 => array( 1 => 1, - 3 => 0, + 3 => 3, ), - 6 => array( + 7 => array( 1 => 1, 3 => 0, ), @@ -135,10 +146,10 @@ function ocio_landing_page_conditional_fields_default_fields() { 'entity' => 'node', 'bundle' => 'ocio_landing_page', 'dependent' => 'field_banner_image_text_color', - 'dependee' => 'field_banner_image_text', + 'dependee' => 'field_banner_image', 'options' => array( 'state' => 'visible', - 'condition' => '!empty', + 'condition' => 'value', 'grouping' => 'AND', 'effect' => 'show', 'effect_options' => array(), @@ -165,113 +176,7 @@ function ocio_landing_page_conditional_fields_default_fields() { 3 => 0, 4 => 0, ), - 5 => array( - 1 => 1, - 2 => 2, - 5 => 0, - 3 => 0, - 4 => 0, - ), - 4 => array( - 1 => 1, - 2 => 2, - 5 => 0, - 3 => 0, - 4 => 0, - ), - 7 => array( - 1 => 1, - 2 => 2, - 5 => 0, - 3 => 0, - 4 => 0, - ), - 6 => array( - 1 => 1, - 2 => 2, - 5 => 0, - 3 => 0, - 4 => 0, - ), - 3 => array( - 1 => 1, - 2 => 2, - 5 => 0, - 3 => 0, - 4 => 0, - ), - ), - 'element_edit' => array( - 1 => 1, - 3 => 3, - ), - 'element_edit_per_role' => 0, - 'element_edit_roles' => array( - 1 => array( - 1 => 1, - 3 => 0, - ), - 2 => array( - 1 => 1, - 3 => 0, - ), - 5 => array( - 1 => 1, - 3 => 0, - ), - 4 => array( - 1 => 1, - 3 => 0, - ), - 7 => array( - 1 => 1, - 3 => 0, - ), 6 => array( - 1 => 1, - 3 => 0, - ), - 3 => array( - 1 => 1, - 3 => 0, - ), - ), - 'selector' => '', - 'values_set' => 1, - 'value' => array(), - 'values' => array(), - 'value_form' => array(), - ), - ); - - $items[] = array( - 'entity' => 'node', - 'bundle' => 'ocio_landing_page', - 'dependent' => 'field_banner_image_text_color', - 'dependee' => 'field_banner_image', - 'options' => array( - 'state' => 'visible', - 'condition' => 'value', - 'grouping' => 'AND', - 'effect' => 'show', - 'effect_options' => array(), - 'element_view' => array( - 1 => 1, - 2 => 2, - 5 => 0, - 3 => 0, - 4 => 0, - ), - 'element_view_per_role' => 0, - 'element_view_roles' => array( - 1 => array( - 1 => 1, - 2 => 2, - 5 => 0, - 3 => 0, - 4 => 0, - ), - 2 => array( 1 => 1, 2 => 2, 5 => 0, @@ -292,14 +197,14 @@ function ocio_landing_page_conditional_fields_default_fields() { 3 => 0, 4 => 0, ), - 7 => array( + 8 => array( 1 => 1, 2 => 2, 5 => 0, 3 => 0, 4 => 0, ), - 6 => array( + 7 => array( 1 => 1, 2 => 2, 5 => 0, @@ -316,7 +221,7 @@ function ocio_landing_page_conditional_fields_default_fields() { ), 'element_edit' => array( 1 => 1, - 3 => 0, + 3 => 3, ), 'element_edit_per_role' => 0, 'element_edit_roles' => array( @@ -328,6 +233,10 @@ function ocio_landing_page_conditional_fields_default_fields() { 1 => 1, 3 => 0, ), + 6 => array( + 1 => 1, + 3 => 0, + ), 5 => array( 1 => 1, 3 => 0, @@ -336,11 +245,11 @@ function ocio_landing_page_conditional_fields_default_fields() { 1 => 1, 3 => 0, ), - 7 => array( + 8 => array( 1 => 1, 3 => 0, ), - 6 => array( + 7 => array( 1 => 1, 3 => 0, ), @@ -369,17 +278,17 @@ function ocio_landing_page_conditional_fields_default_fields() { 'entity' => 'node', 'bundle' => 'ocio_landing_page', 'dependent' => 'field_banner_image_text_location', - 'dependee' => 'field_banner_image_text', + 'dependee' => 'field_banner_image', 'options' => array( 'state' => 'visible', - 'condition' => '!empty', + 'condition' => 'value', 'grouping' => 'AND', 'effect' => 'show', 'effect_options' => array(), 'element_view' => array( 1 => 1, 2 => 2, - 5 => 5, + 5 => 0, 3 => 0, 4 => 0, ), @@ -399,113 +308,7 @@ function ocio_landing_page_conditional_fields_default_fields() { 3 => 0, 4 => 0, ), - 5 => array( - 1 => 1, - 2 => 2, - 5 => 0, - 3 => 0, - 4 => 0, - ), - 4 => array( - 1 => 1, - 2 => 2, - 5 => 0, - 3 => 0, - 4 => 0, - ), - 7 => array( - 1 => 1, - 2 => 2, - 5 => 0, - 3 => 0, - 4 => 0, - ), - 6 => array( - 1 => 1, - 2 => 2, - 5 => 0, - 3 => 0, - 4 => 0, - ), - 3 => array( - 1 => 1, - 2 => 2, - 5 => 0, - 3 => 0, - 4 => 0, - ), - ), - 'element_edit' => array( - 1 => 1, - 3 => 0, - ), - 'element_edit_per_role' => 0, - 'element_edit_roles' => array( - 1 => array( - 1 => 1, - 3 => 0, - ), - 2 => array( - 1 => 1, - 3 => 0, - ), - 5 => array( - 1 => 1, - 3 => 0, - ), - 4 => array( - 1 => 1, - 3 => 0, - ), - 7 => array( - 1 => 1, - 3 => 0, - ), 6 => array( - 1 => 1, - 3 => 0, - ), - 3 => array( - 1 => 1, - 3 => 0, - ), - ), - 'selector' => '', - 'values_set' => 1, - 'value' => array(), - 'values' => array(), - 'value_form' => array(), - ), - ); - - $items[] = array( - 'entity' => 'node', - 'bundle' => 'ocio_landing_page', - 'dependent' => 'field_banner_image_text_location', - 'dependee' => 'field_banner_image', - 'options' => array( - 'state' => 'visible', - 'condition' => 'value', - 'grouping' => 'AND', - 'effect' => 'show', - 'effect_options' => array(), - 'element_view' => array( - 1 => 1, - 2 => 2, - 5 => 0, - 3 => 0, - 4 => 0, - ), - 'element_view_per_role' => 0, - 'element_view_roles' => array( - 1 => array( - 1 => 1, - 2 => 2, - 5 => 0, - 3 => 0, - 4 => 0, - ), - 2 => array( 1 => 1, 2 => 2, 5 => 0, @@ -526,14 +329,14 @@ function ocio_landing_page_conditional_fields_default_fields() { 3 => 0, 4 => 0, ), - 7 => array( + 8 => array( 1 => 1, 2 => 2, 5 => 0, 3 => 0, 4 => 0, ), - 6 => array( + 7 => array( 1 => 1, 2 => 2, 5 => 0, @@ -562,6 +365,10 @@ function ocio_landing_page_conditional_fields_default_fields() { 1 => 1, 3 => 0, ), + 6 => array( + 1 => 1, + 3 => 0, + ), 5 => array( 1 => 1, 3 => 0, @@ -570,11 +377,11 @@ function ocio_landing_page_conditional_fields_default_fields() { 1 => 1, 3 => 0, ), - 7 => array( + 8 => array( 1 => 1, 3 => 0, ), - 6 => array( + 7 => array( 1 => 1, 3 => 0, ), diff --git a/profiles/wcm_base/themes/ocio_omega_base/preprocess/page.preprocess.inc b/profiles/wcm_base/themes/ocio_omega_base/preprocess/page.preprocess.inc index 9d9b6d3ca7fa87073463a361399eee152348727e..059ac97fc620c4ed5ddac4f48dd09a8aec504d21 100644 --- a/profiles/wcm_base/themes/ocio_omega_base/preprocess/page.preprocess.inc +++ b/profiles/wcm_base/themes/ocio_omega_base/preprocess/page.preprocess.inc @@ -28,10 +28,13 @@ function ocio_omega_base_preprocess_page(&$vars) { $top_banner_text = field_view_field('node', $vars['node'], 'field_banner_image_text'); $top_banner['#label_display'] = 'hidden'; - $top_banner_text['#label_display'] = 'hidden'; - $vars['page']['hero']['top_banner']['#markup'] = drupal_render($top_banner) . drupal_render($top_banner_text); + $vars['page']['hero']['top_banner']['#markup'] = drupal_render($top_banner); + if (!empty($vars['node']->field_banner_image_text_color) && !empty($vars['node']->field_banner_image_text_location)) { + $top_banner_text['#label_display'] = 'hidden'; + $vars['page']['hero']['top_banner']['#markup'] .= drupal_render($top_banner_text); + } $bottom_banner = field_view_field('node', $vars['node'], 'field_pre_footer_banner_image'); $bottom_banner['#label_display'] = 'hidden'; $vars['page']['pre_footer']['bottom_banner']['#markup'] = drupal_render($bottom_banner);