Created
November 27, 2009 21:38
-
-
Save bradley-holt/244249 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?= $this->doctype() ?> | |
<html> | |
<head> | |
<?= $this->headTitle() ?> | |
<?= $this->headMeta() ?> | |
<?= $this->headLink() ?> | |
<?= $this->headScript() ?> | |
</head> | |
<body<?= 0 != count($this->routeContext) ? ' class="' . implode(' ', array_unique($this->routeContext)) . '"' : '' ?>> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @category Default | |
* @package Default_Plugin | |
* @copyright Copyright (c) 2005-2010 Found Line, Inc. (http://www.foundline.com/) | |
* @license http://www.foundline.com/legal/software-license/ New BSD License | |
*/ | |
/** | |
* Route Context Plugin | |
* | |
* @category Default | |
* @package Default_Plugin | |
* @copyright Copyright (c) 2005-2010 Found Line, Inc. (http://www.foundline.com/) | |
* @license http://www.foundline.com/legal/software-license/ New BSD License | |
*/ | |
class Default_Plugin_RouteContext extends Zend_Controller_Plugin_Abstract | |
{ | |
public function preDispatch(Zend_Controller_Request_Abstract $request) | |
{ | |
$view = Zend_Layout::getMvcInstance()->getView(); | |
$routeContext = array( | |
$request->getModuleName(), | |
$request->getControllerName(), | |
$request->getActionName(), | |
); | |
$view->routeContext = $routeContext; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment