CMS Development

Craig
Top Contributor

Menu post selector field - v2 custom modules

SOLVE

I'm coding a custom module with some wrapping HTML and a menu selector module - so a different menu can be selected on a per page basis if necessary (mainly for multilingual purposes).

 

However, the 'Menu Selector' field type seems to only return the menu id - I'm not sure there would ever be a valid use case for this unless it can be used to generate the selected menu - is there a way to do this?

0 Upvotes
1 Accepted solution
Craig
Solution
Top Contributor

Menu post selector field - v2 custom modules

SOLVE

Please ignore. I keep forgetting you can use custom HubL within v2 custom modules.

 

{% set topNavMenu = module.top_menu %}          
{% menu "topNav" id="{{ topNavMenu }}" %}

Smiley LOL

View solution in original post

0 Upvotes
1 Reply 1
Craig
Solution
Top Contributor

Menu post selector field - v2 custom modules

SOLVE

Please ignore. I keep forgetting you can use custom HubL within v2 custom modules.

 

{% set topNavMenu = module.top_menu %}          
{% menu "topNav" id="{{ topNavMenu }}" %}

Smiley LOL

0 Upvotes