{{/* Copyright (c) 2018 Eclipse Foundation, Inc. This program and the accompanying materials are made available under the terms of the Eclipse Public License v. 2.0 which is available at http://www.eclipse.org/legal/epl-2.0. Contributors: Christopher Guindon SPDX-License-Identifier: EPL-2.0 */}} {{ if isset .Site.Menus "sidebar" }} {{ $currentPage := . }} {{ .Scratch.Set "currentSection" "home" }} {{ if $currentPage.Section }} {{ .Scratch.Set "currentSection" $currentPage.Section }} {{ end }} {{$currentSection := .Scratch.Get "currentSection" }} {{ range .Site.Menus.sidebar }} {{$parentItem := . }} {{ if and (.HasChildren) (eq $currentSection $parentItem.Identifier) }} {{ end }} {{ end }} {{ if isset $currentPage.Params "custom_sidebar" }} {{ $currentPage.Params.custom_sidebar | safeHTML }} {{ end }} {{ end }}