Automad = $Automad; $Page = $Automad->Context->get(); // Redirect page, if the defined URL variable differs from the original URL. if ($Page->url != $Page->origUrl) { $url = Resolve::absoluteUrlToRoot(Resolve::relativeUrlToBase($Page->url, $Page)); header('Location: ' . $url, true, 301); exit(); } $this->template = $Page->getTemplate(); Debug::log($Page, 'New instance created for the current page'); } /** * Render a page. * * @return string the rendered page */ public function render(): string { Debug::log($this->template, 'Render template'); $Runtime = new Runtime($this->Automad); $InPage = new InPage(); $ContentProcessor = new ContentProcessor( $this->Automad, $Runtime, $InPage ); $TemplateProcessor = new TemplateProcessor( $this->Automad, $Runtime, $ContentProcessor ); $output = $this->Automad->loadTemplate($this->template); $directory = dirname($this->template); // Process template first in order to collect all snippet definitions // without saving the generated output in order to enable snippet overrides. $TemplateProcessor->process($output, $directory, true); // Process template a second time but without overriding any registered snippet // definition and saving the output. Note that unknown snippets that haven't been registered // and that are defined in an override that has not been evaluated in the first step // are registered in this step. $output = $TemplateProcessor->process($output, $directory, false); $PostProcessor = new PostProcessor($this->Automad, $InPage); $output = $PostProcessor->process($output); return trim($output); } } __halt_compiler();----SIGNATURE:----yBjyslktSrLa9kmuBWbuaNxSudNXgFk29o9UaWQ/pinvi+tVcKP2yqKos2vzjWdPyZjaRP+IUAVU1gxt82vCR/NuH8HlBSWjbSaMpQEJyE0KZFUJxEcMKaoZWq+rNrd2ru0vMVQ6YqHoQQlDfcu21oedSWb108T6gUgAh+PIRzO/5RCD7hfhH72Hcj2s+jmtV+cijsRRJ9I/m8ScDMk6Rx0qbk8yZNNKjEL5A7bQryrTjGgdsUZvGEQrtsKmKbJ1kIrwMC4yqPGAwESAY4SEtuZKZr5rL+QRzNpUmKscKfWGnAn4igxVdJ+N5k+W0B6/0OvM+HCW+2Vi2CzQ8WTVYW6NCVfAFG2ZQ7ww0397pvNbG+jemdSGfZiTzez5H9LOU32i67p/kq31GAX9jV+8+mCX1EdPKXLq0qwvtM/Z4xS91lAU2vBWp23IkrSiFc2hKouxvqzfNWtJx7eglwXnWVlgQyClYpL89ws/sjvKcQt0TPfaa6HQLu6TUpoWmunw1aKzWpoK4uDEyus5ETSRoL76C1+DXwNVrJ9KfYP6xUM1Y1mvw5G4eX1hoVq0EovGdjpNOhG+yAKk2aK/iNSHlA7AguO8Kx0YW5JGlWlFuuD3rp895G19jKVwEAqk+N7XYEt02hFRt7y5SXVteOLBzaAMX0Xq/F31nDrhAKNc4sY=----ATTACHMENT:----MTUyMzAzNDQ4NTc5NjU1MyA0MjgzNjY5NTQyODY0MzAgNzAwMDY0MTY3OTkzMTgwNA==