Skip to content

Commit 35aee8d

Browse files
Merge pull request #25 from TechnologyEnhancedLearning/feature/fix-footer-links
Feature/fix footer links
2 parents e8b6a83 + 8660b9e commit 35aee8d

File tree

6 files changed

+29
-5
lines changed

6 files changed

+29
-5
lines changed

classes/output/core_renderer.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,20 @@ public function get_global_header_data() {
244244
return $context;
245245
}
246246

247+
public function get_footer_data(): \stdClass {
248+
$context = new \stdClass();
249+
250+
$dotnet_base_url = get_config('theme_nhse', 'dotnet_base_url');
251+
if (!empty($dotnet_base_url) && substr($dotnet_base_url, -1) !== '/') {
252+
$dotnet_base_url .= '/';
253+
}
254+
255+
$context->dotnet_base_url = $dotnet_base_url;
256+
257+
return $context;
258+
259+
}
260+
247261
public function standard_head_html() {
248262
$output = parent::standard_head_html();
249263

templates/columns1.mustache

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@
6969
</div>
7070
</div>
7171
{{{ output.standard_after_main_region_html }}}
72-
{{> theme_nhse/footer }}
72+
{{# output.get_footer_data }}
73+
{{> theme_nhse/footer }}
74+
{{/ output.get_footer_data }}
7375

7476
</div>
7577
{{{ output.standard_end_of_body_html }}}

templates/columns2.mustache

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,9 @@
100100
</div>
101101
</div>
102102
{{{ output.standard_after_main_region_html }}}
103-
{{> theme_nhse/footer }}
103+
{{# output.get_footer_data }}
104+
{{> theme_nhse/footer }}
105+
{{/ output.get_footer_data }}
104106
</div>
105107

106108
</body>

templates/drawers.mustache

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,9 @@
179179
</div>
180180
<!-- end of div id="page"-->
181181

182-
{{> theme_nhse/footer }}
182+
{{# output.get_footer_data }}
183+
{{> theme_nhse/footer }}
184+
{{/ output.get_footer_data }}
183185
{{{ output.standard_after_main_region_html }}}
184186

185187
</div>

templates/login.mustache

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@
4747
</div>
4848
<!-- end of div id="page"-->
4949

50-
{{> theme_nhse/footer }}
50+
{{# output.get_footer_data }}
51+
{{> theme_nhse/footer }}
52+
{{/ output.get_footer_data }}
5153
{{{ output.standard_after_main_region_html }}}
5254
</div>
5355

templates/secure.mustache

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@
8383
</div>
8484
</footer>
8585
</div>
86-
{{> theme_nhse/footer }}
86+
{{# output.get_footer_data }}
87+
{{> theme_nhse/footer }}
88+
{{/ output.get_footer_data }}
8789
</body>
8890
</html>
8991
{{#js}}

0 commit comments

Comments
 (0)