public function snippetFunction(
        $slug,
        $template = null
    ) {
        $result = null;
        if ($this->handler && $this->router) {
            $route = $this->router->generate(
                '_ongr_plain_cms_snippet',
                [
                    'slug' => $slug,
                    'template' => $template,
                ]
            );
            try {
                $result = $this->handler->render($route, $this->renderStrategy);
            } catch (\InvalidArgumentException $ex) {
                // ESI is disabled.
                $result = $this->handler->render($route);
            }
        }

        return $result;
    }