Guest User

Untitled

a guest
Mar 20th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. [
  2. ...
  3. 'layout' => 'main',
  4. 'components' => [
  5. ...
  6. ]
  7. ]
  8.  
  9. $config = [
  10. ...
  11.  
  12. 'layoutPath' => '@app/views/layouts-2'
  13. ];
  14.  
  15. <?php $this->beginContent('@app/views/layouts/main.php'); ?>
  16. <div class="container">
  17. <div class="row">
  18. <div class="col-lg-4">Left Side Bar</div>
  19.  
  20. <div id="content" class="col-lg-4">
  21. <?php echo $content; ?>
  22. </div><!-- content -->
  23.  
  24. <div class="col-lg-4">Right Side Bar</div>
  25. </div>
  26. </div>
  27. <?php $this->endContent(); ?>
  28.  
  29. public function actionIndex()
  30. {
  31. $this->layout = 'defaultLayout';
  32.  
  33. return $this->render('index', [
  34. 'model' =>$model,
  35. ]);
  36. }
  37.  
  38. [
  39. // ...
  40. 'components' => [
  41. 'view' => [
  42. 'layout' => 'main.php'
  43. ],
  44. // ...
  45. ],
  46. ]
  47.  
  48. $config = [
  49. ...
  50. 'layoutPath' => '@app/views/layouts2',
  51. 'layout' => 'main2.php',
  52. ];
  53.  
  54. 'layout' => 'main_style'
Add Comment
Please, Sign In to add comment