Skip to content
Grav 2.0 is officially stable. Read the announcement →
General

Changement de thème pour débutant

Started by flamion 7 years ago · 0 replies · 495 views
7 years ago

Bonjour, je viens d'installer Grav et je veux changer de thème mais je me trouve devant un code

Hello, I just installed Grav and I want to change the theme but I find myself in front of a code

/home
/fabriquexi
/rubriques
/system
/src
/Grav
/Common
/Twig
/Twig.php

PHP
            $this->twig->setCache(false);
        }

        // Get Twig template layout
        $template = $this->template($page->template() . $ext);

        try {
            $output = $this->twig->render($template, $vars + $twig_vars);
        } catch (\Twig_Error_Loader $e) {
            $error_msg = $e->getMessage();
            // Try html version of this template if initial template was NOT html
            if ($ext != '.html' . TWIG_EXT) {
                try {
                    $page->templateFormat('html');
                    $output = $this->twig->render($page->template() . '.html' . TWIG_EXT, $vars + $twig_vars);
                } catch (\Twig_Error_Loader $e) {
                    throw new \RuntimeException($error_msg, 400, $e);
                }
            } else {
                throw new \RuntimeException($error_msg, 400, $e);
            }
        }

        return $output;
    }

    /**
     * Wraps the Twig_Loader_Filesystem addPath method (should be used only in `onTwigLoader()` event
     * @param $template_path
     * @param null $namespace
     */
    public function addPath($template_path, $namespace = '__main__')
    {
        $this->loader->addPath($template_path, $namespace);
    }

    /**
     * Wraps the Twig_Loader_Filesystem prependPath method (should be used only in `onTwigLoader()` event
     * @param $template_path
     * @param null $namespace

Arguments

TXT
"Template "blog.html.twig" is not defined."

Que dois-je faire ?
what should I do ?

Suggested topics

Topic Participants Replies Views Activity
General · by Hanns Mattes, 17 hours ago
1 21 9 hours ago
General · by Andy Miller, 9 hours ago
0 21 9 hours ago
General · by Jerry Hunt, 5 days ago
2 143 2 days ago
General · by pamtbaau, 2 days ago
1 95 2 days ago
General · by Andy Miller, 2 days ago
0 79 2 days ago