From 0753b28342e1ba09c361891727f2b4e01de82395 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Tue, 18 Feb 2014 18:23:03 +0000 Subject: [PATCH] Some more HTML changes --- application/layouts/scripts/layout.phtml | 2 +- application/layouts/scripts/parts/menu.phtml | 28 +++++++++++++++++++ .../layouts/scripts/parts/navigation.phtml | 4 ++- 3 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 application/layouts/scripts/parts/menu.phtml diff --git a/application/layouts/scripts/layout.phtml b/application/layouts/scripts/layout.phtml index 16818d1d5..94fc83baf 100755 --- a/application/layouts/scripts/layout.phtml +++ b/application/layouts/scripts/layout.phtml @@ -1,7 +1,7 @@ +items as $item) { + + printf( + ' %s%s', + $this->href($this->url) === $this->href($item->getUrl()) ? ' class="active"' : '', + $item->getUrl() ? $this->href($item->getUrl()) : '#', + $item->getIcon() ? $this->img( + $item->getIcon(), + array('height' => '16px', 'width' => '16px') + ) . ' ' : '', + $item->getTitle() + ); + + if ($item->hasChildren()) { + echo $this->partial( + 'parts/menu.phtml', + array('items' => $item->getChildren(), 'url' => $this->url) + ); + } + + echo "\n"; +} + +?> + diff --git a/application/layouts/scripts/parts/navigation.phtml b/application/layouts/scripts/parts/navigation.phtml index 929eaf13f..c39bb23df 100755 --- a/application/layouts/scripts/parts/navigation.phtml +++ b/application/layouts/scripts/parts/navigation.phtml @@ -1,7 +1,9 @@