Read heading and intro from the pages record on /posts and /events

This commit is contained in:
tleininger committed 2026-09-30 21:33:26 +02:00
1 parent 666614a3b2
commit 4fa17429b5
7 files changed
+87 -7

No files matched your search

@@ -1,8 +1,19 @@
@page "/events"
<PageTitle>Termine</PageTitle>
@{
// Heading and intro come from the "events" page record; fall back to a sensible
// default only if that record is missing, so the page still renders.
var title = _page?.Title ?? "Termine";
}
<h1>Termine</h1>
<PageTitle>@title</PageTitle>
<h1>@title</h1>
@if (_page is not null && !string.IsNullOrWhiteSpace(_page.Body))
{
<article>@Body</article>
}
@if (_unavailable)
{