Read heading and intro from the pages record on /posts and /events
This commit is contained in:
1 parent
666614a3b2
commit
4fa17429b5
7 files changed
+87
-7
No files matched your search
@@ -255,6 +255,22 @@ public sealed class PocketBaseFixture : IAsyncLifetime
|
||||
title = "Downloads", body = "# Downloads", location = "header",
|
||||
order = 5, slug = "downloads", embed = Array.Empty<string>(), @public = true,
|
||||
});
|
||||
// Page records for the posts and events lists. Routes /posts and /events are
|
||||
// served by PostList and EventList, which read these records for their heading
|
||||
// and intro (title + body) and render the list themselves, just like FaqList.
|
||||
// The body carries no "# heading": the title already renders as the h1.
|
||||
await CreateRecordAsync(http, "pages", new
|
||||
{
|
||||
title = "Beiträge", body = "Neuigkeiten aus dem Elternbeirat.",
|
||||
location = "header",
|
||||
order = 6, slug = "posts", embed = Array.Empty<string>(), @public = true,
|
||||
});
|
||||
await CreateRecordAsync(http, "pages", new
|
||||
{
|
||||
title = "Termine", body = "Sitzungen und Veranstaltungen auf einen Blick.",
|
||||
location = "header",
|
||||
order = 7, slug = "events", embed = Array.Empty<string>(), @public = true,
|
||||
});
|
||||
// A plain content page reached only by its slug (not shown in the header),
|
||||
// so the catch-all "/{slug}" ContentPage route stays covered. It carries a
|
||||
// valid location because the field is required; footer keeps it low-key.
|
||||
|
||||
Reference in new issue
Block a user