Commit 19396fb4 authored by Eric Bremner's avatar Eric Bremner
Browse files

ISTWCMS-3249: ensuring that ctas display

parent db38b24b
CTAS HERE
{% include "@molecules/embedded-content/call-to-actions/call-to-actions.twig" with {
"ctas": ctas
} %}
......@@ -582,7 +582,6 @@ function uw_fdsu_theme_resp_preprocess_eck_entity(&$vars) {
// If we are on a call to action, process it.
if (isset($vars['elements']['#uw_et_embeddable_content'])) {
//kint ($vars['eck_entity']->type->getValue()[0]['target_id']);
switch ($vars['eck_entity']->type->getValue()[0]['target_id']) {
case 'uw_eb_call_to_action':
......@@ -617,10 +616,18 @@ function uw_fdsu_theme_resp_preprocess_eck_entity(&$vars) {
'type' => $text_entity->field_uw_cta_type_of_text->getValue()[0]['value'],
);
}
// Increment the array element counter.
$cta_count++;
}
// If there are ctas, put them in the variables for the template to use.
if (isset($ctas)) {
// Put ctas variable into template for usage.
$vars['ctas'] = $ctas;
}
// Increment the array element counter.
$cta_count++;
break;
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment