From 1a5fe5443901c20fc99c01a889014d82cfb0c666 Mon Sep 17 00:00:00 2001 From: Dreytac Date: Fri, 17 Apr 2026 04:17:34 +1000 Subject: [PATCH] Create field blueprints for pinning content in a list and showing on the home page. --- blueprints/fields/pinned.yml | 9 +++++++++ blueprints/fields/show-on-home.yml | 10 ++++++++++ index.php | 2 ++ 3 files changed, 21 insertions(+) create mode 100644 blueprints/fields/pinned.yml create mode 100644 blueprints/fields/show-on-home.yml diff --git a/blueprints/fields/pinned.yml b/blueprints/fields/pinned.yml new file mode 100644 index 0000000..c6abc4e --- /dev/null +++ b/blueprints/fields/pinned.yml @@ -0,0 +1,9 @@ +type: fields + +fields: + pinned: + label: Pinned + type: toggle + text: + - "No" + - "Yes" diff --git a/blueprints/fields/show-on-home.yml b/blueprints/fields/show-on-home.yml new file mode 100644 index 0000000..21ba820 --- /dev/null +++ b/blueprints/fields/show-on-home.yml @@ -0,0 +1,10 @@ +type: fields + +fields: + showOnHome: + label: Show On Home + type: toggle + default: true + text: + - "No" + - "Yes" diff --git a/index.php b/index.php index 1356557..ed53b9e 100644 --- a/index.php +++ b/index.php @@ -25,6 +25,8 @@ Kirby::plugin( "fields/link-locations" => __DIR__ . "/blueprints/fields/link-locations.yml", "fields/link-location" => __DIR__ . "/blueprints/fields/link-location.yml", "fields/dates" => __DIR__ . "/blueprints/fields/dates.yml", + "fields/pinned" => __DIR__ . "/blueprints/fields/pinned.yml", + "fields/show-on-home" => __DIR__ . "/blueprints/fields/show-on-home.yml", ], "snippets" => [ "navbar/primary" => __DIR__ . "/snippets/navbar/primary.php",