@eeacms/volto-eea-website-theme 3.9.1 → 3.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
|
4
4
|
|
|
5
5
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
6
6
|
|
|
7
|
+
### [3.9.2](https://github.com/eea/volto-eea-website-theme/compare/3.9.1...3.9.2) - 22 September 2025
|
|
8
|
+
|
|
9
|
+
#### :hammer_and_wrench: Others
|
|
10
|
+
|
|
11
|
+
- feature(context-navigation): allow disabling of side nav per content type [David Ichim - [`5430166`](https://github.com/eea/volto-eea-website-theme/commit/54301668a9fdcffb9f17f509147e3e91d028964e)]
|
|
7
12
|
### [3.9.1](https://github.com/eea/volto-eea-website-theme/compare/3.9.0...3.9.1) - 26 August 2025
|
|
8
13
|
|
|
9
14
|
### [3.9.0](https://github.com/eea/volto-eea-website-theme/compare/3.8.0...3.9.0) - 20 August 2025
|
package/package.json
CHANGED
|
@@ -35,8 +35,12 @@ const DefaultView = (props) => {
|
|
|
35
35
|
const hasExistingSideMenu = React.useMemo(() => {
|
|
36
36
|
const hasSM = (node) => {
|
|
37
37
|
if (!node) return false;
|
|
38
|
-
if (
|
|
39
|
-
|
|
38
|
+
if (
|
|
39
|
+
node['@type'] === 'contextNavigation' &&
|
|
40
|
+
node['variation'] === 'accordion'
|
|
41
|
+
) {
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
40
44
|
if (node.blocks && node.blocks_layout?.items) {
|
|
41
45
|
return node.blocks_layout.items.some((id) => hasSM(node.blocks[id]));
|
|
42
46
|
}
|
|
@@ -93,6 +97,8 @@ const DefaultView = (props) => {
|
|
|
93
97
|
const Container =
|
|
94
98
|
config.getComponent({ name: 'Container' }).component || SemanticContainer;
|
|
95
99
|
|
|
100
|
+
const content_type = content?.['@type'];
|
|
101
|
+
|
|
96
102
|
// choose the longest matching navigation path (most specific prefix)
|
|
97
103
|
const matchingNavigationPath = React.useMemo(() => {
|
|
98
104
|
const navigation_paths = contextNavigationActions || [];
|
|
@@ -106,11 +112,15 @@ const DefaultView = (props) => {
|
|
|
106
112
|
);
|
|
107
113
|
if (!candidates.length) return null;
|
|
108
114
|
|
|
109
|
-
|
|
115
|
+
const candidate = candidates.reduce(
|
|
110
116
|
(best, np) => (!best || np.url.length > best.url.length ? np : best),
|
|
111
117
|
null,
|
|
112
118
|
);
|
|
113
|
-
|
|
119
|
+
const disabledTypes =
|
|
120
|
+
(candidate && candidate.disableContextNavigationFor) || [];
|
|
121
|
+
if (disabledTypes.includes(content_type)) return null;
|
|
122
|
+
return candidate;
|
|
123
|
+
}, [contextNavigationActions, content_type, path]);
|
|
114
124
|
|
|
115
125
|
return contentLoaded ? (
|
|
116
126
|
hasBlocksData(content) ? (
|