O'Reilly logo

Joomla! 1.5 JavaScript jQuery by Jose Argudo Blanco

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

Inserting, editing, and deleting records in our admin zone

All these actions are very basic for any admin zone, and we are going to create them in our own. For users to be able to perform these actions we placed some buttons that we did in our view, administrator/components/com_tinynews/views/tinynews/view.html.php, as follows:

function display(){
            JToolBarHelper::title('Tinynews', 'generic.png' );
            JToolBarHelper::deleteList();
            JToolBarHelper::editListX();
            JToolBarHelper::addNewX();
            $model =& $this->getModel();
            $news = $model->getallnews();
            $this->assignRef('news', $news);
            parent::display();
            }
        

The new button doesn't need more information, but the delete and edit ones will need something more: the records they will take action to. For this we will ...

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