From: arno Date: Tue, 27 Jul 2010 22:14:11 +0000 (+0200) Subject: removes trailing idx/ for main page link in footer X-Git-Tag: v0.2~88 X-Git-Url: https://dev.renevier.net/?p=syj.git;a=commitdiff_plain;h=aa1b3365fcf3d78fbe20166a03fc92fab3928708 removes trailing idx/ for main page link in footer --- 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; /*