Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

想问一下主题开发怎么实现首页底部分组的效果 #906

Closed
52Lau opened this issue Jun 10, 2020 · 5 comments
Closed

想问一下主题开发怎么实现首页底部分组的效果 #906

52Lau opened this issue Jun 10, 2020 · 5 comments
Labels
kind/support Categorizes issue or PR as a support question.

Comments

@52Lau
Copy link

52Lau commented Jun 10, 2020

菜单有分组,但是想实现的这种效果又不是菜单,所以想问下,有什么办法实现这种效果

主题的配置list?好像成本大

image

image

image

image

@52Lau 52Lau added the kind/support Categorizes issue or PR as a support question. label Jun 10, 2020
@ruibaby
Copy link
Member

ruibaby commented Jun 10, 2020

目前的菜单支持分组和多级,所以实现你这种难度不是很大,但是目前来说可能配置比较繁琐。

可以使用 menu 的自定义标签 treeByTeam

<@menuTag method="treeByTeam" team="xxx">
 <#list menus as menu>
      <li>
        <a href="${menu.url!}">${menu.name!}</a>
        <#if menu.children?? && menu.children?size gt 0>
            <ul>
              <#list menu.children as child>
                <li>
                  <a href="${child.url!}">${child.name!}</a>
                </li>
              </#list>
            </ul>
        </#if>
      </li>
    </#list>
</@menuTag>

其中 xxx 即你在后台菜单为菜单设置的分组。这样你就可以通过对一些菜单项目设置不同的分组来实现你上面的效果了。

@ruibaby
Copy link
Member

ruibaby commented Jun 10, 2020

Snipaste_2020-06-10_14-08-55

@52Lau
Copy link
Author

52Lau commented Jun 10, 2020

哦,那就是一开始我在添加菜单的时候就要分组 把顶部菜单和底部菜单区分开来

@ruibaby
Copy link
Member

ruibaby commented Jun 10, 2020

@52Lau 没错

@52Lau
Copy link
Author

52Lau commented Jun 10, 2020

好的,谢谢

@ruibaby ruibaby closed this as completed Jun 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/support Categorizes issue or PR as a support question.
Projects
None yet
Development

No branches or pull requests

2 participants