Updating data from the frontend
To many Joomla! users, the backend administrator is a scary place full of confusing settings that could possibly break your site, so let's make it easier on our users and let them manage the content of our component via the frontend. We will call our updfolios
list view and our updfolio
edit form.
Creating the list view
Every view should have a controller, so let's create that first. Create a file named updfolios.php
under /components/com_folio/controllers/
and add the following code:
<?php defined('_JEXEC') or die; class FolioControllerUpdfolios extends JControllerAdmin { public function getModel($name = 'Folio', $prefix = 'FolioModel', $config = array('ignore_request' => true)) { $model = parent::getModel($name, $prefix, $config); return $model; } public function saveOrderAjax() { $input = JFactory::getApplication()->input; $pks = $input->post->get('cid', array(), 'array'); $order = $input->post...