src/View/TwigView.php
public function renderInclude($name, $path = null)
    {
        $twigConfig = Config::load('twig');
        $pathFile = pathFile($name);
        $folder = $pathFile[0];
        $name = $pathFile[1];

        $path = $twigConfig->get('setTemplateDir') . DIRECTORY_SEPARATOR . $folder . $name . $twigConfig->get('fileExtension', '.twig');

        try {
            if (!is_file($path)) {
                throw new ViewException('Can not open template ' . $name . ' in: ' . $path);
            }

            $renderInclude = $this->twig->render($name, $this->assign);
        } catch (ViewException $e) {
            echo $e->getMessage() . '<br />
                        File: ' . $e->getFile() . '<br />
                        Code line: ' . $e->getLine() . '<br />
                        Trace: ' . $e->getTraceAsString();
            exit();
        }

        return $renderInclude;
    }
public function renderInclude($name, $path = null)
    {
        $twigConfig = Config::load('twig');
        $pathFile = pathFile($name);
        $folder = $pathFile[0];
        $name = $pathFile[1];

        $path = $twigConfig->get('setTemplateDir') . DIRECTORY_SEPARATOR . $folder . $name . $twigConfig->get('fileExtension', '.twig');

        try {
            if (!is_file($path)) {
                throw new ViewException('Can not open template ' . $name . ' in: ' . $path);
            }

            $renderInclude = $this->twig->render($name, $this->assign);
        } catch (ViewException $e) {
            echo $e->getMessage() . '<br />
                        File: ' . $e->getFile() . '<br />
                        Code line: ' . $e->getLine() . '<br />
                        Trace: ' . $e->getTraceAsString();
            exit();
        }

        return $renderInclude;
    }
Transfers the code to the Smarty template.

@param string $name
@param string $path

@return mixed