Example #1
0
    define('DS', '/');
}
// Require the base controller
require_once JPATH_COMPONENT . '/controller.php';
jimport('joomla.application.component.model');
require_once JPATH_COMPONENT . '/models/model.php';
// Component Helper
jimport('joomla.application.component.helper');
//add Helperpath to JHTML
JHTML::addIncludePath(JPATH_COMPONENT . '/helpers');
//include Helper
require_once JPATH_COMPONENT . '/helpers/beallitasok.php';
//set the default view
$controller = JRequest::getWord('view', 'beallitasok');
//add submenu
BeallitasokHelper::addSubmenu($controller);
$ControllerConfig = array();
// Require specific controller if requested
if ($controller) {
    $path = JPATH_COMPONENT . '/controllers/' . $controller . '.php';
    $ControllerConfig = array('viewname' => strtolower($controller), 'mainmodel' => strtolower($controller), 'itemname' => ucfirst(strtolower($controller)));
    if (file_exists($path)) {
        require_once $path;
    } else {
        $controller = '';
    }
}
// Create the controller
$classname = 'BeallitasokController' . $controller;
$controller = new $classname($ControllerConfig);
// Perform the Request task