merge_email_verifier #3

Merged
tracer merged 23 commits from merge_email_verifier into master 2022-11-04 10:35:23 +01:00
1 changed files with 8 additions and 18 deletions
Showing only changes of commit 1120f1798f - Show all commits

View File

@ -10,33 +10,23 @@ use Symfony\Component\Routing\Annotation\Route;
class PagesController extends AbstractController
{
#[Route(path: '/pages/{name}', name: 'pages_display')]
public function display(PagesRepository $pagesRepository, string $name): Response
#[Route(path: '/pages/{slug}', name: 'pages_display')]
public function display(PagesRepository $pagesRepository, string $slug): Response
{
$page = $pagesRepository->findOneBy([
'slug' => $name,
'slug' => $slug,
]);
if (!$page) {
$page = new Pages();
$page->setName(name: 'Not Found');
$page->setContent(content: 'The requested page was not found.');
$page->setContent(content: '404 - The requested page was not found.');
}
return $this->render(view: '@default/pages/display.html.twig', parameters: [
'page' => $page,
return $this->render(view: '@default/pages/index.html.twig', parameters: [
'page_name' => $page->getName(),
'page_content' => $page->getContent()
]);
}
#[Route(path: '/imprint', name: 'app_imprint')]
public function imprint(): Response
{
return $this->render(view: '@default/pages/imprint.html.twig');
}
#[Route(path: '/privacy', name: 'app_privacy')]
public function privacy(): Response
{
return $this->render(view: '@default/pages/privacy.html.twig');
}
}