Subsites: Show modeladmin in backend on all subsites

By default subsites module disables all custom modeladmin classes in backend when you're not on the Main site (SubsiteID 0).

You can add your ModelAdmins to all subsites by adding this config to your config.yml:

MyCoolModelAdmin:
  extensions:
    - SubsiteMenuExtension

If you need more fancy logic on which Subsite your admin should be shown simply create a method called  subsiteCMSShowInMenu() which checks if all conditions are given and returns a boolean value.

Rate this post (1 rating(s))

Post your comment

Comments

  • Werner Krauss 13/07/2016 10:56am (8 years ago)

    @rati: hard to tell without seeing your code. But for help you might better ask on http://stackoverflow.com/questions/tagged/silverstripe

  • rati 30/05/2016 12:54pm (8 years ago)

    i install sub site but it is not showing my cutom model admin module created in admin , can you let me know .. how can i fix this ..

RSS feed for comments on this page | RSS feed for all comments