Guest User

Main Layout - Yii2-Smarty

a guest
Jul 8th, 2015
317
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Smarty 1.14 KB | None | 0 0
  1. {use class="yii\helpers\Html"}
  2.  
  3. {use class="frontend\assets\AppAsset"}
  4. {AppAsset::register($this)|void}
  5.  
  6. {$this->beginPage()}
  7. <!DOCTYPE html>
  8. <html lang="{$app->language}">
  9. <head>
  10.     {$this->head()}
  11.     {block name="header-meta"}
  12.         <meta charset="{$app->charset}">
  13.         <meta name="viewport" content="width=device-width, initial-scale=1">
  14.         {Html::csrfMetaTags()}
  15.         <title>{Html::encode($this->title)}</title>
  16.     {/block}
  17.     {block name="header-css"}{/block}
  18.     {block name="header-js"}{/block}
  19. </head>
  20.  
  21. <body>
  22.     {$this->beginBody()}
  23.     {block name="body"}
  24.         <div class="wrap">
  25.             {block name="main-navigation"}
  26.                 {include file="@app/views/layouts/navigation.tpl"}
  27.             {/block}
  28.  
  29.             <div class="container">
  30.                 {$content}
  31.             </div>
  32.         </div>
  33.     {/block}
  34.  
  35.     {block name="footer"}
  36.         <footer class="footer">
  37.             <div class="container">
  38.                 <p class="pull-left">&copy;</p>
  39.                 <p class="pull-right">Powered by Yii2.</p>
  40.             </div>
  41.         </footer>
  42.     {/block}
  43. </body>
  44. </html>
Advertisement
Add Comment
Please, Sign In to add comment