Toolbar buttons and component options
We already have the New, Edit, and Options buttons showing in our component, but there are quite a few more standard buttons that users expect to see in a component, such as Publish, Unpublish, Archive, Trash, and Help.
Open the file /administrator/components/com_folio/views/folios/view.html.php
, and make the following changes:
<?php defined('_JEXEC') or die; class FolioViewFolios extends JViewLegacy { protected $items; protected $state; public function display($tpl = null) { $this->items = $this->get('Items'); $this->state = $this->get('State'); if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } $this->addToolbar(); parent::display($tpl); } protected function addToolbar() { $canDo = FolioHelper::getActions(); $bar = JToolBar::getInstance('toolbar'); JToolbarHelper::title(JText::_('COM_FOLIO_MANAGER_FOLIOS...