From b0e5240abe188fdecdd43968a9f43d4554f34b7e Mon Sep 17 00:00:00 2001 From: Joshua Nicholson <94021017+jnicholCU@users.noreply.github.com> Date: Wed, 29 Nov 2023 10:55:33 -0700 Subject: [PATCH] Update page.html.twig Update for the sidebar menu hide/show. --- templates/layout/page.html.twig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/layout/page.html.twig b/templates/layout/page.html.twig index 2e9ccc56..fab8b089 100644 --- a/templates/layout/page.html.twig +++ b/templates/layout/page.html.twig @@ -175,7 +175,8 @@ {{ page.above_content }} {% endif %} - {% if page.left_sidebar|render or page.right_sidebar|render %} + {# We are checking for length below to make sure that the sidebars have any content. This is so that sidebar menus don't render the sidebars if the menu is empty #} + {% if (page.left_sidebar|render|striptags|trim|length > 0) or (page.right_sidebar|render|striptags|trim|length > 0) %} {% if page.left_sidebar|render and page.right_sidebar|render %}