dpevsxjn809817 2016-09-27 02:22
浏览 19
已采纳

集中模块设置和模型管理

I have a module where I need to:

  • Manage Models
  • Manage Module Settings
    • API Authentication
    • Look & Feel
    • Etc

For Manage Models I obviously have a ModelAdmin extension

And for the latter Manage Module Settings I've had to create a DataExtension

Though this splits up the "Module Functionality" into two sections, ModelAdmin gets its own menu item on the sidebar, but the DataExtension only adds tabs to the Settings menu item.

I've searched around but to no avail on how to consolidate my custom tabs within the same menu item that ModelAdmin creates.

Is this possible? I understand the semantics behind ModelAdmin being that it only Administers Models but surely the functionality exists where you can add tabs to the menu item it creates that aren't models?

Surely it's not an abnormal scenario

  • 写回答

1条回答 默认 最新

  • duanbeng8872 2016-09-27 10:04
    关注

    The only way you could do this would be to extend LeftAndMain (as you have mentioned).

    This can be a little daunting, but LeftAndMain is basically just a container for 3 templates:

    1. Main admin template
    2. Left hand nav template
    3. Main edit form

    At a basic level you can just create an extension to LeftAndMain, then add a custom "EditForm" function that has the settings fields you need (as well as actions to save the data).

    Then if you want it to look fancier then you can overwrite the default LeftAndMain templates in framework/admin/tempaltes.

    There are some docs on this on the Silverstripe site: https://docs.silverstripe.org/en/3.4/developer_guides/customising_the_admin_interface/cms_layout/

    Hope that helps a bit.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 各位请问平行检验趋势图这样要怎么调整?说标准差差异太大了
  • ¥15 delphi webbrowser组件网页下拉菜单自动选择问题
  • ¥15 wpf界面一直接收PLC给过来的信号,导致UI界面操作起来会卡顿
  • ¥15 init i2c:2 freq:100000[MAIXPY]: find ov2640[MAIXPY]: find ov sensor是main文件哪里有问题吗
  • ¥15 运动想象脑电信号数据集.vhdr
  • ¥15 三因素重复测量数据R语句编写,不存在交互作用
  • ¥15 微信会员卡等级和折扣规则
  • ¥15 微信公众平台自制会员卡可以通过收款码收款码收款进行自动积分吗
  • ¥15 随身WiFi网络灯亮但是没有网络,如何解决?
  • ¥15 gdf格式的脑电数据如何处理matlab