public function display($tpl = null)
    {
        $attributes = array();
        $query = array();

        $app = JFactory::getApplication();
        $input = $app->input;

        $routeName = $input->get('route', null, 'string');
        $path = $input->get('path', null, 'string');

        $route = self::$router->getRouteCollection()->get($routeName);
        $defaults = $route->getDefaults();

        if ($path !== null) {
            $path = rtrim($route->getPath(), '/') . '/' . $path;
            $defaults = self::$router->match($path, null, false);
        }

        unset($attributes['_controller']);

        foreach ($defaults as $key => $default) {
            if (!isset($attributes[$key])) {
                $attributes[$key] = $default;
            }
        }

        $subRequest = self::$requestStack->getCurrentRequest()->duplicate($query, null, $attributes);

        $this->response = self::$kernel->handle(
            $subRequest,
            \Symfony\Component\HttpKernel\HttpKernelInterface::SUB_REQUEST,
            false
        );

            // Display the view
        parent::display($tpl);
    }