From 9ec04c98790e29523fc07eb63145f7c251e7bd6d Mon Sep 17 00:00:00 2001 From: TheRON Date: Sun, 7 Jun 2026 12:37:32 -0400 Subject: [PATCH] Updated --- hubzilla/addon/vs01/Widget/CivicNav.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/hubzilla/addon/vs01/Widget/CivicNav.php b/hubzilla/addon/vs01/Widget/CivicNav.php index e05b446..eab5ea4 100644 --- a/hubzilla/addon/vs01/Widget/CivicNav.php +++ b/hubzilla/addon/vs01/Widget/CivicNav.php @@ -81,11 +81,6 @@ class CivicNav { private function resolve_slug() { $module = \App::$module ?? ''; - // On addon module pages (vs01, dsc01, scn01): slug is argv(1). - if (in_array($module, ['vs01', 'dsc01', 'scn01'], true)) { - return \argv(1) ?? ''; - } - // On the channel page: slug is the local part of channel_address. if ($module === 'channel') { $addr = \App::$profile['channel_address'] ?? ''; @@ -93,6 +88,16 @@ class CivicNav { // channel_address may be bare (kingsrow-wdca) or full (kingsrow-wdca@node). return explode('@', $addr)[0]; } + return ''; + } + + // On any registered addon module page: slug is argv(1). + // Module list is driven by the civicnav registry — no hardcoded names. + $addons = $this->load_registry(); + foreach ($addons as $addon) { + if (($addon['module'] ?? '') === $module) { + return \argv(1) ?? ''; + } } return '';