From aa1b3365fcf3d78fbe20166a03fc92fab3928708 Mon Sep 17 00:00:00 2001 From: arno Date: Wed, 28 Jul 2010 00:14:11 +0200 Subject: [PATCH] removes trailing idx/ for main page link in footer --- application/layouts/scripts/footer.phtml | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/application/layouts/scripts/footer.phtml b/application/layouts/scripts/footer.phtml index 4003423..1d73c67 100644 --- a/application/layouts/scripts/footer.phtml +++ b/application/layouts/scripts/footer.phtml @@ -5,25 +5,17 @@ echo '' . PHP_EOL; /* * main page link */ -$page = new Zend_Navigation_Page_Mvc(array( - 'route' => 'idx', - 'params' => array( - 'action' => 'index', - 'controller' => 'idx', - 'url' => ''))); $front = Zend_Controller_Front::getInstance(); $reqParams = $front->getRequest()->getParams(); if ($reqParams['controller'] == 'idx' and (!isset($reqParams['url']))) { - $current = true; + $mainpage = true; } else { - $current = false; + $mainpage = false; } -$mainpage = $current; - $content = $this->translate("main page"); -$link = ($current) ? $this->escape($content) : $this->anchor($page->getHRef(), $content, array('class' => 'footer-anchor')); +$link = ($mainpage) ? $this->escape($content) : $this->anchor($this->baseUrl(), $content, array('class' => 'footer-anchor')); echo '' . PHP_EOL; /* -- 2.39.2