From 53429fafa2d26e35391f10892521397d9db0c315 Mon Sep 17 00:00:00 2001 From: Alex Parsons Date: Tue, 13 Feb 2024 21:32:34 +0000 Subject: [PATCH] Set recent_divisions $this_page to trigger menus --- www/docs/divisions/index.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/www/docs/divisions/index.php b/www/docs/divisions/index.php index b584efa4f5..57d5b6ec3c 100644 --- a/www/docs/divisions/index.php +++ b/www/docs/divisions/index.php @@ -3,7 +3,6 @@ include_once '../../includes/easyparliament/init.php'; include_once INCLUDESPATH . 'easyparliament/member.php'; -$this_page = 'divisions_recent'; $MEMBER = null; if ($THEUSER->postcode_is_set()) { @@ -11,6 +10,20 @@ } $houses = get_http_var('house', '', true); + +// Set to a special version of the page name to get right parliament menus +if ($houses == 'scotland') { + $this_page = 'divisions_recent_sp'; +} elseif ($houses == 'senedd') { + $this_page = "divisions_recent_wales"; +} elseif ($houses == 'commons') { + $this_page = 'divisions_recent_commons'; +} elseif ($houses == 'lords') { + $this_page = 'divisions_recent_lords'; +} else { + $this_page = 'divisions_recent'; +} + $divisions = new MySociety\TheyWorkForYou\Divisions($MEMBER); $data = $divisions->getRecentDivisions(30, $houses);