We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e9f75e7 commit dac6511Copy full SHA for dac6511
src/helpers/nav-group.js
@@ -0,0 +1,6 @@
1
+'use strict'
2
+
3
+module.exports = ({ data: { root: { page, site } } }) => {
4
+ const pageComponentName = page.component.name
5
+ return site.keys.navGroups.find(({ components }) => components.includes(pageComponentName))
6
+}
src/partials/footer-scripts.hbs
@@ -2,6 +2,9 @@
<script src="{{siteRootPath}}/site-navigation-data.js"></script>
<script>
window.siteNavigationGroups = {{{stringify (compile-nav-groups)}}}
+{{#if page.component}}
+window.pageNavigationGroup = "{{{lookup (nav-group) 'title'}}}"
7
+{{/if}}
8
</script>
9
<script src="{{{uiRootPath}}}/js/site.js"></script>
10
{{#with page.attributes.content-scripts}}
0 commit comments