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 toolbars

Adding toolbar buttons to the backend of your component is quick and easy. Joomla! has a class named JToolBarHelper that allows you build the toolbar one button at a time, without having to touch HTML. The buttons consist of an image, HTML, and Javascript that interacts with<form> elements in your component.

To put JToolBarHelper to use, we will create a set of buttons that you would normally find on a screen for managing a list of records. Open /administrator/components/com_restaurants/restaurants.php and add the following code just before the line echo 'Restaurant Reviews':

JToolBarHelper::title( JText::_( 'Restaurant Reviews' ), 'generic.png' ); JToolBarHelper::publishList(); JToolBarHelper::unpublishList(); JToolBarHelper::editList(); ...

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