From 9793100216cfb13bc87569a2f26ef81cc220b3f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Weber?= Date: Wed, 23 Feb 2022 12:59:09 +0100 Subject: [PATCH] children: set containerstyle automatically according to style #192 --- layouts/shortcodes/children.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/layouts/shortcodes/children.html b/layouts/shortcodes/children.html index 7558a6901f..2c5bf2ad23 100644 --- a/layouts/shortcodes/children.html +++ b/layouts/shortcodes/children.html @@ -5,6 +5,9 @@ {{- $withDescription := .Get "description" | default false }} {{- $sortTerm := .Get "sort" | lower }} {{- $containerstyle := .Get "containerstyle" | default "ul" }} +{{- if( and (not (eq $style "li") ) (eq $containerstyle "ul" ) ) }} + {{- $containerstyle = "div" }} +{{- end }} {{ (printf "<%s class=\"children children-%s children-sort-%s\">" $containerstyle $style $sortTerm)|safeHTML }} {{- $pages := .Page.Pages }}