如何在浏览时隐藏左侧的Sonata Admin菜单

问题描述 投票:2回答:1

任何帮助都将受到欢迎。

What are you trying to accomplish?

我有一个Sonata Admin面板,有些页面有大量数据,所以我需要隐藏左侧菜单。但是当我回到另一个页面(从一个显示到一个列表)或者我点击一个动作按钮(从列表到显示),然后再次显示菜单。

Paste the part of the code that shows the problem.

我想也许,以同样的方式我可以保持我的表单过滤器应用,即使我在页面之间浏览(sonata_admin.persist_filters)也许有另一种方法来设置一个全局奏鸣曲参数,将“强制”左侧菜单显示或者为将来的请求隐藏,直到我点击图标再次显示或隐藏它。

What do you expect the result to be?

我只想在页面之间隐藏左侧菜单。

Sonata Admin with collapsed menu

What is the actual result you get?

目前,当我点击Sonata标题旁边的图标时,菜单会隐藏,但是当我浏览其他页面时,菜单会再次显示。

Sonata Admin with expanded menu

php symfony sonata-admin sonata
1个回答
0
投票

更新:现在已实现,这是从3.30.0版本开始的标准行为。


据我所知,目前没有这样的功能。您仍然可以通过提供PR来实现此功能,从而帮助我们更好地制作Sonata。

我在这里打开了一个跟踪此功能的问题:https://github.com/sonata-project/SonataAdminBundle/issues/4837

© www.soinside.com 2019 - 2024. All rights reserved.