From e87c1b5d6a208cdf81a7d0d756dc755bec0322da Mon Sep 17 00:00:00 2001 From: Evan Winslow Date: Mon, 18 Oct 2010 22:48:22 +0000 Subject: Added support for tags with bodies --- views/default/html/tag.php | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'views/default') diff --git a/views/default/html/tag.php b/views/default/html/tag.php index d2f888d49..8ad6679b4 100644 --- a/views/default/html/tag.php +++ b/views/default/html/tag.php @@ -41,7 +41,17 @@ foreach ($attributes as $attr => $val) { $element[] = "$attr=\"$val\""; } } -$element[] = $js; -$element[] = "/>"; -echo implode(" ", $element); \ No newline at end of file +if (!empty($js)) { + $element[] = $js; +} + +if (!isset($vars['body'])) { + $element[] = '/'; +} + +echo implode(" ", $element).">"; + +if (isset($vars['body'])) { + echo $vars['body'].""; +} \ No newline at end of file -- cgit v1.2.3