]> dev.renevier.net Git - syj.git/blobdiff - application/layouts/scripts/footer.phtml
change "main page" to "create a route"
[syj.git] / application / layouts / scripts / footer.phtml
index 4003423b558562f2b0b476a9b1cf04e53af3c7ad..57678579a13e84612ba057093c207313e61e1206 100644 (file)
@@ -5,25 +5,17 @@ echo '<div id="footer-padding"></div>' . 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'));
+$content = $this->translate("create a route");
+$link = ($mainpage) ? $this->escape($content) : $this->anchor($this->baseUrl(), $content, array('class' => 'footer-anchor'));
 echo '<div class="footer-link">' . $link . '</div>' . PHP_EOL;
 
 /*
@@ -39,7 +31,7 @@ echo $this->footerLink(array(
 /*
  * login, logout, account links
  */
-if ($this->loggedUser()) {
+if ($this->loggedUser) {
     echo $this->footerLink(array(
             'route' => 'account',
             'action'     => 'index',