Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protected function beforeRender($view)
- {
- if (!Yii::app()->detectMobileBrowser->showMobile) {
- Yii::app()->setTheme('mobile');
- $this->layout = $this->getLayoutFile('//layouts/column1');
- print_r($this->layout);
- $cs = Yii::app()->clientScript;
- $cs->registerCssFile( yii::app()->theme->baseurl. '/css/mobile.css' );
- //$this->layout ="//layouts/column1";
- }
- **************column1.php*********** path (themes/mobile/layouts/column1) ********
- <?php $this->beginContent('//layouts/main'); ?>
- <div class="container">
- <?php echo $content; ?>
- </div>
- <?php $this->endContent(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement