简体   繁体   English

Liferay 7.2 打印自定义菜单

[英]Liferay 7.2 print custom menu

I have Liferay 7.2 I create a custom theme.我有 Liferay 7.2 我创建了一个自定义主题。

I created a custom navigation menu "link-utili" in back-end我在后端创建了一个自定义导航菜单“link-utili”

I have main navigation but i need a secondary navigation before the footer but i have not any solution.我有主导航,但我需要在页脚之前进行辅助导航,但我没有任何解决方案。

I tried:我试过:

<#assign preferencesMap = {"displayDepth": "1", "portletSetupPortletDecoratorId": "barebone", "siteNavigationMenuType": "2"} />

            <@liferay.navigation_menu
                default_preferences=freeMarkerPortletPreferences.getPreferences(preferencesMap)
                instance_id="link-utili"
            />

how i cand do that?我怎么能做到?

If you have marked your custom Site-NavigationMenu as "Seconday Navigation" (see the ... context-menu of your menu entry), you could use the following snippet in your theme to print the secondary navigation (as an example, some settings can be adjusted to fit your needs):如果您已将自定义 Site-NavigationMenu 标记为“Seconday Navigation”(请参阅​​...可以调整以满足您的需要):

<#assign secondaryNavigationPreferencesMap = {
        "displayStyle": "ddmTemplate_NAVBAR-BLANK-JUSTIFIED-FTL", 
        "portletSetupPortletDecoratorId": "barebone", 
        "rootLayoutType": "relative", 
        "siteNavigationMenuId": "0",
        "siteNavigationMenuType": "2"
      } 
    />

<@liferay.navigation_menu
  default_preferences=freeMarkerPortletPreferences.getPreferences(secondaryNavigationPreferencesMap)
  instance_id="secondary_navigation_menu"
/>

I do not know how to reference it via its name (here "link-utili").我不知道如何通过它的名字来引用它(这里是“link-utili”)。 I always use "marked navigation menus".我总是使用“标记导航菜单”。 Maybe someone could add this hint here.也许有人可以在这里添加这个提示。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM