Pages

Tuesday, November 9, 2010

Zend Framework- sample Layout

<?php echo $this->doctype(); ?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <?php $this->css()->append($this->urls()->css()."/player.css"); ?>
    <?php $this->css()->append($this->urls()->css()."/mygrid.css"); ?>
    <?php $this->css()->append($this->urls()->css()."/gallery.css"); ?>
    <?php if(isset($this->user) && $this->user->theme_name != "")
            $this->css()->append($this->urls()->css().'/themes/player_'.$this->user->theme_name.'.css','screen',true,array('id' => 'layout_css'));   
    ?>
    <?php $this->headScript()->prependScript('var ZAAHDATEFORMAT = "'."yy-mm-dd".'";') ?>
    <?php $this->headScript()->prependScript('var g_site_path = "'.$this->baseUrl().'";') ?>
    <?php $this->headScript()->prependScript('var g_imge_path = "'.$this->urls()->images().'";') ?>
    <?php $this->headScript()->prependScript('var g_skin_path = "'.$this->urls()->skin().'";') ?>
    <?php $header =  $this->render('includes/header.phtml'); ?>
    <?php $widgets    =    $this->widget(); ?>
    <?php $topmenu    =    $this->topmenu(); ?>
    <?php $this->js()->addLibrary(); ?>
    <?php echo $this->headMeta();?>
    <?php echo $this->headTitle();?>
    <?php echo $this->headStyle();?>
    <?php echo $this->headLink();?>

</head>
<body id="playerbody">
    <div class="cornerBG">
        <div class="header">
          <div class="header_main">
            <?php
                    /*** To display Header links and header ***/
                    echo $header;
       
                    /*** To display Main menu bar ***/
                    echo $topmenu;
       
                    /*** To display body content ***/
                    echo $this->render('includes/body_content.phtml');
       
                    /*** To display bottom widgets  ***/
                    echo $widgets;
                           
                    /*** To display footer with bottom links  ***/
                    echo $this->render('includes/footer.phtml');
                ?>
          </div>
        </div>
    </div>
    <?php $this->js()->onload(); ?>
    <?php echo $this->headScript();?>
</body>
</html>

No comments:

Post a Comment