private function fig_include(Context $context) {

        $file = $this->includedFile;

        $realFilename = dirname($context->getFilename()).'/'.$file;
        //Create a sub-view, attached to the current element.
        $view = new View();

        if ($context->view->getCachePath() && $context->view->getTemplatesRoot()) {
            $view->setCachePath($context->view->getCachePath(), $context->view->getTemplatesRoot());
        }
        $view->loadFile($realFilename);


        //Parse the subview (build its own tree).
        $context->pushInclude($realFilename, $view->figNamespace);

        $view->parse();

        // If the included template specifies a doctype, use it globally for our context.
        if ($view->getRootNode() instanceof ViewElementTag) {
            $doctype = $view->getRootNode()->getAttribute($context->figNamespace . 'doctype');
            if ($doctype) {
                $context->setDoctype($doctype);
            }
        }


        $result = $view->getRootNode()->render($context);

        $context->popInclude();
        return $result;
    }