O'Reilly logo

Yii Rapid Application Development Hotshot by James R. Hamilton III, Lauren J. O'Meara

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Finishing Touches for the Mobile View

With a few changes to the layout, we can get to where we need to go.

Engage Thrusters

  1. Open ch2 | Source Files | protected | views | layouts | mobile.php. Change the lines between <div data-role="page"> and <div data-role="content"> as follows:
    <div data-role="collapsible" data-theme="b"> <h3>Main Menu</h3> <?php $htmlOptions = array('data-role' => 'controlgroup', 'class' => 'localnav'); $linkOptions = array('data-role' => 'button', 'data-theme' => 'b', 'rel' => 'external'); $items = array(); if (Yii::app()->user->isGuest) { $items[] = array('label'=>'Login', 'url'=>array('/site/login'), 'linkOptions' => $linkOptions); } else { $items[] = array('label'=>'Home', 'url'=>array('/site/index'), 'linkOptions' => $linkOptions); ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required