Beruflich Dokumente
Kultur Dokumente
http://docs.joomla.org/Creating_a_toolbar_for_your_com...
An example of creating a custom button in the admin list of records of your component could be: administrator/views/hellos/view.html.php
public function display($tpl = null) { $this->state $this->items $this->pagination = $this->get('State'); = $this->get('Items'); = $this->get('Pagination');
// Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } $this->addToolbar();
1 de 2
09/05/13 12:05
http://docs.joomla.org/Creating_a_toolbar_for_your_com...
$this->sidebar = JHtmlSidebar::render(); parent::display($tpl); } protected function addToolbar() { // assuming you have other toolbar buttons ... JToolBarHelper::custom('hellos.extrahello', 'extrahello.png', 'extrahello_f2.png', }
administrator/controllers/hellos.php
public function extrahello() { // Get the input $input = JFactory::getApplication()->input; $pks = $input->post->get('cid', array(), 'array'); // Sanitize the input JArrayHelper::toInteger($pks); // Get the model $model = $this->getModel(); $return = $model->extrahello($pks); // Redirect to the list screen. $this->setRedirect(JRoute::_('index.php?option=com_hello&view=hellos', false)); }
Helpful explanation of JToolBarHelper/custom here - http://docs.joomla.org /JToolBarHelper/custom Retrieved from "http://docs.joomla.org /index.php?title=Creating_a_toolbar_for_your_component&oldid=85763" Categories: Component Development Tutorials
This page was last modied on 29 April 2013, at 04:31. Content is available under Joomla! EDL.
2 de 2
09/05/13 12:05