O'Reilly logo

Learning Joomla! 1.5 Extension Development by Joseph L. LeBlanc

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

Creating a list screen

Because our administrators will not have access to phpMyAdmin, we need to build a screen that lists all of the reviews in the database. Accomplishing this will involve creating another folder inside the views folder and calling up the code from restaurants.php. Until now, we've been using switch statements to test the value of $task and to call an appropriate function. You could keep doing this, but it would be more convenient for you to combine these tasks. Remove the code below the call to JTable::addIncludePath() and insert the following code in its place:

jimport('joomla.application.component.controller'); class RestaurantsController extends JController { function add() { JRequest::setVar('view', 'single'); $this->display(); ...

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