diff --git a/templates/paragraphs/paragraph--uw-para-quicklinks-block.html.twig b/templates/paragraphs/paragraph--uw-para-quicklinks-block.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..26961a135f24c1683ac9354b45e54571ed10dd7e --- /dev/null +++ b/templates/paragraphs/paragraph--uw-para-quicklinks-block.html.twig @@ -0,0 +1,6 @@ +{% include '@organisms/single-page/quicklinks-block/quicklinks-block.twig' with { + 'anchor_link': anchor_link, + 'display_title': display_title, + 'title': content.field_uw_block_title|field_value, + 'quicklinks': content.field_uw_quicklink +} %} \ No newline at end of file diff --git a/uw_fdsu_theme_resp.theme b/uw_fdsu_theme_resp.theme index 01114a54dc19134cb226b5dc3e2b82160886dc32..c045d694bca7f092bf9bc5ff00ee9cff1394a91a 100644 --- a/uw_fdsu_theme_resp.theme +++ b/uw_fdsu_theme_resp.theme @@ -109,6 +109,39 @@ function uw_fdsu_theme_resp_preprocess_paragraph(&$variables) { $variables['display_title'] = "Off"; } + break; + case "uw_para_quicklinks_block": + + $display_title = _uw_fdsu_theme_resp_get_field_value_from_paragraph($variables['paragraph'], 'field_uw_display_title'); + + // If the title is to be displayed, set variable to On. + if ($display_title) { + $variables['display_title'] = "On"; + } + // If the title is not to be displayed, set variable to Off. + else { + $variables['display_title'] = "Off"; + } + + // Set the anchor link. + $variables['anchor_link'] = _uw_fdsu_theme_resp_get_field_value_from_paragraph($variables['paragraph'], 'field_uw_anchor_link'); + + // Set the responsive image variables. + // _uw_fdsu_theme_resp_add_responsive_image_variables($variables, 'field_uw_icon_image', 'uw_resp_is_marketing_item'); + + // Set link section title + //$variables['quicklinks'] = _uw_fdsu_theme_resp_get_field_value_from_paragraph($variables['paragraph'], array( + // [0] => [ + // 'img_src' => 'field_uw_icon_image', + // 'link_section_title' => 'field_uw_link_section_title', + // 'links' => 'field_uw_quicklinks_links', + //]); +//vardumper($variables['content']['field_uw_quicklink']); + +$sources= _uw_fdsu_theme_resp_add_responsive_image_variables($variables['content']['field_uw_quicklink'][0], 'field_uw_icon_image', 'uw_resp_is_marketing_item', TRUE); +vardumper($sources); + + break; } }