From e42ebca83093658937a1e2048f00e9fe762192a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?benjamin=20melan=C3=A7on?= Date: Thu, 18 Jun 2020 11:47:54 -0400 Subject: [PATCH] Override display suite two column layout to remove their classes, keep columns on mobile For landing page teasers Ref #221 --- ...l--node-landing-page-simple-card.html.twig | 2 ++ agaric/templates/layout/ds-2col.html.twig | 29 +++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 agaric/templates/layout/ds--2col--node-landing-page-simple-card.html.twig create mode 100644 agaric/templates/layout/ds-2col.html.twig diff --git a/agaric/templates/layout/ds--2col--node-landing-page-simple-card.html.twig b/agaric/templates/layout/ds--2col--node-landing-page-simple-card.html.twig new file mode 100644 index 0000000..173e2c4 --- /dev/null +++ b/agaric/templates/layout/ds--2col--node-landing-page-simple-card.html.twig @@ -0,0 +1,2 @@ +{% extends "ds-2col.html.twig" %} +{% set attributes = attributes.addClass('is-mobile') %} diff --git a/agaric/templates/layout/ds-2col.html.twig b/agaric/templates/layout/ds-2col.html.twig new file mode 100644 index 0000000..ab7ee3c --- /dev/null +++ b/agaric/templates/layout/ds-2col.html.twig @@ -0,0 +1,29 @@ +{# +/** + * @file + * Override Display Suite 2 column template to get rid of DS classes. + * + * Available variables: + * - outer_wrapper: outer wrapper element + * - left_wrapper: wrapper element around left region + * - right_wrapper: wrapper element around right region + * - attributes: layout attributes + * - left_attributes: attributes for left region + * - right_attributes: attributes for right region + * - left: content of left region + * - right: content of right region + */ +#} +<{{ outer_wrapper }}{{ attributes.addClass('clearfix') }}> + + {{ title_suffix.contextual_links }} + + <{{ left_wrapper }}{{ left_attributes.addClass('') }}> + {{ left }} + + + <{{ right_wrapper }}{{ right_attributes.addClass('') }}> + {{ right }} + + +