I am trying to create a dynamic sidebar in zend framework. I have googled some articles, browsed even the stackoverflow archive but i can't seem to get it so please help me figure this out. Here is some code from my layout.phtml file:
<div id="contentWrapper">
<div id="contentArea">
<?php echo $this->layout()->content;
?>
</div>
<div id="sidebar">
<div id="user-authentication">
<?php if (Zend_Auth::getInstance()->hasIdentity()) {
?>Logged In as<br />
<?php
echo Zend_Auth::getInstance()->getIdentity();
} else {
?>
<input type="text" name="login" class="loginInput" /><br/>
<input type="password" name="password" class="loginInput" /><br/>
<input type="submit" name="submit" value="Log In" class="loginButton" />
<?php } ?>
</div>
<div id="sidebar-content">
<? echo $this->layout()->sidebar; ?>
</div>
</div>
</div>
Ben bu Best practice creating dynamic sidebar with zend framework kullanabilirsiniz ama ben giriş kutusunu görüntülemek için gereksiz kodu olması gerekir demektir / olarak giriş.