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

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