Jump to content

Why admin theme is in 2 folders?


Marek
 Share

Recommended Posts

the templates-admin is a vestigal folder from the earlier versions, but it is there in the event that the module fails, it is basically a failsafe at this point, as far as i can tell.

If you are developing a new admin theme, then you would do it all self-contained in your module.

Link to comment
Share on other sites

That's not fully true. templates-admin contains for example the whole show-if javascript logic, which can be seen as a kinda "global" functionality, while the themes are actually mostly there for the "look" of the admin backend.

  • Like 2
Link to comment
Share on other sites

Since admin themes are modules, the templates-admin serves as a fallback in case no AdminTheme modules are able to be loaded for one reason or another. That admin theme is there so that you can still login and fix your system if everything goes haywire for whatever reason… though I don't know of many scenarios where that would be the case, but consider it an insurance plan. Since it's there, it also serves as a good location for files that must be shared among all admin themes (whether the AdminTheme modules, or the fallback theme, or an older /site/templates-admin/). For example, the inputfields.js file, the debug.inc file, font-awesome, and possibly more in the future. It serves this purpose well and I don't see any reason to get rid of it. We may update it at some point to change the look of it, but also don't see it as much of a priority since nobody ever sees it except in rare development situations. Lastly, it's the only thing that enables use of older /site/templates-admin/ themes, for those that need to use the older system of admin themes for one reason or another (like folks that have company-customized admin themes from long ago, but still want to use a newer PW version). 

  • Like 3
Link to comment
Share on other sites

  • 4 weeks later...

...Lastly, it's the only thing that enables use of older /site/templates-admin/ themes, for those that need to use the older system of admin themes for one reason or another (like folks that have company-customized admin themes from long ago, but still want to use a newer PW version). 

All of my projects will require a custom admin interface to ACL'd functionality. What is the recommended approach to create administrative interfaces that maintain current and future compatibility?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...