Skip to content

Instantly share code, notes, and snippets.

@eminetto
Created April 27, 2012 13:20
Show Gist options
  • Save eminetto/2509166 to your computer and use it in GitHub Desktop.
Save eminetto/2509166 to your computer and use it in GitHub Desktop.
Layout usando Zend_Dojo
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<?php
Zend_Dojo::enableView($this);
if ($this->dojo()->isEnabled()):
echo $this->dojo();
echo $this->dojo()->addStylesheetModule('dijit.themes.tundra');
endif;
?>
<body class="tundra">
<h1>Blog do Minetto</h1>
<?php
//mensagens de erro
$session = Zend_Registry::get('session');
if(isset($session->erro))
echo "<p> $session->erro </p>";
unset($session->erro);
?>
<?php echo $this->layout()->content; ?>
<?php
//usuario logado?
$auth = Zend_Auth::getInstance();
if ($auth->hasIdentity()) { ?>
<p>Logado como <?php echo $auth->getIdentity();?> </p>
<p><a href="/auth/logout">Sair</a></p>
<?php
}
else {
?>
<p><a href="/auth">Fazer login</a></p>
<?php
}
?>
<h5>Powered by Heineken</h5>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment