From ea034ecec665aff04fd74c81e11c34000a9b9492 Mon Sep 17 00:00:00 2001 From: Michael Weimann Date: Sat, 14 Dec 2019 10:35:42 +0100 Subject: Add the container class to some views --- includes/sys_template.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'includes/sys_template.php') diff --git a/includes/sys_template.php b/includes/sys_template.php index cf4c64aa..33044fad 100644 --- a/includes/sys_template.php +++ b/includes/sys_template.php @@ -251,11 +251,17 @@ function page($elements) * * @param string $title * @param string[] $elements + * @param bool $container * @return string */ -function page_with_title($title, $elements) +function page_with_title($title, $elements, bool $container = false) { - return '

' . $title . '

' . join($elements) . '
'; + if ($container) { + $html = '
'; + } else { + $html = '
'; + } + return $html . '

' . $title . '

' . join($elements) . '
'; } /** -- cgit v1.2.3-54-g00ecf