From d20854fe9839a3af67e90ffdab9b50abdfea6a07 Mon Sep 17 00:00:00 2001 From: Cory Dransfeldt Date: Thu, 17 Oct 2024 16:59:21 -0700 Subject: [PATCH] chore: add view --- views/globals/nav.psql | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 views/globals/nav.psql diff --git a/views/globals/nav.psql b/views/globals/nav.psql new file mode 100644 index 00000000..89b48dc8 --- /dev/null +++ b/views/globals/nav.psql @@ -0,0 +1,14 @@ +CREATE OR REPLACE VIEW optimized_navigation AS +SELECT + n.id, + n.menu_location, + n.permalink, + n.icon, + n.title, + n.sort, + p.title AS page_title, + p.permalink AS page_permalink +FROM + navigation n +LEFT JOIN + pages p ON n.pages = p.id; \ No newline at end of file