adib16
adib16

Reputation: 1707

adding toolbar at backend of joomla component

i added this toolbar in my component

JToolBarHelper::addNew('dropdown.add');

when click on the new button by default this controller called. contollers dropdown.php and in the dropdown file search for dropdownControllerdropdown class and call this class. but i want to change this default behavior.how to make when user click on the add button componnent go to dropdown.php file and call helloworldControllerdropdown class instead of dropdownControllerdropdown class ???

Upvotes: 0

Views: 175

Answers (1)

di3sel
di3sel

Reputation: 2012

In your dropdown php try to modify:

require_once('helloworld.php');

class DropdownControllerDropdown extends HelloWorldControllerDropdown

In this case when method add is called it will use HelloWorldControllerDropdown method add if it's not defined in DropdownControllerDropdown

Upvotes: 1

Related Questions