Advertisement
Guest User

Untitled

a guest
Feb 26th, 2012
1,103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. protected function beforeRender($view)
  2. {
  3. if (!Yii::app()->detectMobileBrowser->showMobile) {
  4. Yii::app()->setTheme('mobile');
  5. $this->layout = $this->getLayoutFile('//layouts/column1');
  6. print_r($this->layout);
  7. $cs = Yii::app()->clientScript;
  8. $cs->registerCssFile( yii::app()->theme->baseurl. '/css/mobile.css' );
  9. //$this->layout ="//layouts/column1";
  10. }
  11.  
  12.  
  13. **************column1.php*********** path (themes/mobile/layouts/column1) ********
  14.  
  15. <?php $this->beginContent('//layouts/main'); ?>
  16. <div class="container">
  17. <?php echo $content; ?>
  18. </div>
  19. <?php $this->endContent(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement