I would like to build a mega menu (multilevel menu) in liferay 7 with freemarker language. The theme I use just prints the menu but is not multilevel.
How can i change the code and add my classes and js?
The code is:
<nav class="navbar-nav navbar-right site-navigation" id="navigation" role="navigation">
        <#assign
        VOID = freeMarkerPortletPreferences.setValue("displayDepth", "1")
        VOID = freeMarkerPortletPreferences.setValue("portletSetupPortletDecoratorId", "barebone")
        />
        <@liferay.navigation_menu
        instance_id="main_navigation_menu"
        default_preferences="${freeMarkerPortletPreferences}"
        />
        <#assign VOID = freeMarkerPortletPreferences.reset() />
    </nav>
 
                        
I managed to print the links with freemarker language:
I created custom_navigation.ftl file and added it in portal_normal.ftl with the following code:
The custom_navigation.ftl code:
and the bootstrap mega menu example I followed is this.
In the end you need a few css changes to adapt to your colors and taste.