From 5bd5e7a7315be50754e48660a1bcb0cabd62488f Mon Sep 17 00:00:00 2001
From: Paul Steven
Date: Tue, 8 Jul 2025 15:46:22 +0100
Subject: [PATCH] Feature: update footer link functionality to use dynamic path
correctly
---
classes/output/core_renderer.php | 13 +++++++++++++
templates/columns1.mustache | 4 +++-
templates/columns2.mustache | 4 +++-
templates/drawers.mustache | 4 +++-
templates/login.mustache | 4 +++-
templates/secure.mustache | 4 +++-
6 files changed, 28 insertions(+), 5 deletions(-)
diff --git a/classes/output/core_renderer.php b/classes/output/core_renderer.php
index 6c62160..9aee11a 100644
--- a/classes/output/core_renderer.php
+++ b/classes/output/core_renderer.php
@@ -228,6 +228,19 @@ public function get_global_header_data() {
return $context;
}
+ public function get_footer_data(): \stdClass {
+ $context = new \stdClass();
+
+ $dotnet_base_url = get_config('theme_nhse', 'dotnet_base_url');
+ if (!empty($dotnet_base_url) && substr($dotnet_base_url, -1) !== '/') {
+ $dotnet_base_url .= '/';
+ }
+
+ $context->dotnet_base_url = $dotnet_base_url;
+
+ return $context;
+ }
+
/**
* Wrapper for header elements.
diff --git a/templates/columns1.mustache b/templates/columns1.mustache
index 3c5a7e8..08cbd67 100644
--- a/templates/columns1.mustache
+++ b/templates/columns1.mustache
@@ -69,7 +69,9 @@
{{{ output.standard_after_main_region_html }}}
- {{> theme_nhse/footer }}
+ {{# output.get_footer_data }}
+ {{> theme_nhse/footer }}
+ {{/ output.get_footer_data }}
{{{ output.standard_end_of_body_html }}}
diff --git a/templates/columns2.mustache b/templates/columns2.mustache
index b15af27..21b6b20 100644
--- a/templates/columns2.mustache
+++ b/templates/columns2.mustache
@@ -100,7 +100,9 @@
{{{ output.standard_after_main_region_html }}}
- {{> theme_nhse/footer }}
+ {{# output.get_footer_data }}
+ {{> theme_nhse/footer }}
+ {{/ output.get_footer_data }}