getActive(); // Get the page/component configuration $params = &$mainframe->getParams(); //set page title $document->setTitle($menu->name); $url = $params->def( 'url', '' ); $row = new stdClass(); if ( $params->def( 'add_scheme', 1 ) ) { // adds 'http://' if none is set if ( substr( $url, 0, 1 ) == '/' ) { // relative url in component. use server http_host. $row->url = 'http://'. $_SERVER['HTTP_HOST'] . $url; } elseif ( !strstr( $url, 'http' ) && !strstr( $url, 'https' ) ) { $row->url = 'http://'. $url; } else { $row->url = $url; } } else { $row->url = $url; } require_once (JPATH_COMPONENT.DS.'views'.DS.'wrapper'.DS.'view.php'); $view = new WrapperViewWrapper(); $view->assignRef('params' , $params); $view->assignRef('wrapper' , $row); $view->display(); } } ?>