I am currently building a custom theme for a website, and am in the process of writing a draft. I have built a menu in the Navigation Editor and am trying to make it appear on the webpage. However, for some reason, it is not appearing in either the theme menu or the content creator interface when I drag and drop to create a new menu. The theme so far is an adaptation of the boilerplate code available from HubSpot, and it uses the menu() function in the boilerplate module "menu-section.module."
In order to diagnose the issue, I printed module.primary_menu_field and menu(module.primary_menu_field)|pprint. The first one prints out the menu ID correctly. However, the second one (with the menu() function) prints the following:
After that, the menu itself is meant to be returned in the boilerplate code by:
renderNavigation(menu(module.primary_menu_field))
But the menu does not appear, I presume because the menu function is returning what appears to be an empty PageTreeNode.
Is it possible that somehow HubSpot is not finding the menu from the Navigation Editor? Is there any possible resolutions? Any help would be appreciated. Thank you!
Thank you so much for the clarification. I haven't published any pages yet (they are just called test[N] where N is a number I increment), so that explains why they are not appearing. As I move forward, I will just not make them link to pages until those pages are published, so I can build out the menu accordingly.
Interesting. For the first time, I am seeing something more than nothing. The relevant code (omitting most of the module, which is from the boilerplate) is below: