Jump to content

Templates-admin folder vs admin module and creating new admin theme


SamC
 Share

Recommended Posts

Please can someone explain to me the relationship between the templates-admin folder and the AdminThemeUikit module?

I wanted to try and make an admin theme just as a learning experience (plus a process module to go with it) but stuck at the first hurdle. In the page source, when I’m logged in, files from both these locations are involved. But there seems to be duplicate stuff in both locations.

I copied templates-admin into /site/ but these files are never used, ones from /wire/ are always used to display the admin root page.

Also, where are the sass (or is it less?) files to compile in AdminThemeUikit? Where do customisations go? I thought I saw it in one the PW blog posts but can’t find enough info to get started.

Any advice is appreciated, thanks.

Link to comment
Share on other sites

 

 Hi @SamC

You can choose in AdminThemeUikit module settings page which location should be used by the module.  Also, don't forget to update AdminThemeUikit to the latest version. 

Take a look at this blog post 

http://processwire.com/blog/posts/processwire-3.0.83-core-updates/

Sources of CSS could be found in https://github.com/ryancramerdesign/AdminThemeUikit

  • Like 1
Link to comment
Share on other sites

After looking through the files, I'm still not following how this fits together. In my admin, the source is like so:

5a08640383cad_ScreenShot2017-11-12at15_07_36.thumb.jpg.589974e907eec2abaaacefd457c1d906.jpg

Not sure why css is being pulled from templates-admin and AdminThemeUikit folders?

As there are no source files (sass/less) in the core AdminThemeUikit folder, I need to download the admin theme module instead then work with that for compiling from source. i.e. download the module and put it in '/site/modules/'. I presume what you mentioned @Zeka is this:

5a08673023fc0_ScreenShot2017-11-12at15_21_51.thumb.jpg.ef4c5c875d1b445fdfb8045d273b3687.jpg

That makes sense, but still don't know what 'templates-admin' folder is for.

Link to comment
Share on other sites

49 minutes ago, SamC said:

but still don't know what 'templates-admin' folder is for.

It's mostly a legacy thing, but also functions as a fallback if the other themes aren't loaded for some reason. That said, I am not sure if the css file from that directory is needed if another theme is working as expected. 

  • Thanks 1
Link to comment
Share on other sites

Thanks @adrian

I’m only trying to take pre-existing elements, move them around, change the template layout and the css. A ‘concept’ idea I guess you could call it.

I think it will help me better understand how the admin is actually constructed. I don’t understand a lot of the code in the uikit admin theme and I thought the templates might be more like login.php for login page, main.php, modal.php, sidebar.php etc. i.e. the pages broken up into blocks for easier customisation. Would also prefer to use BS4 than uikit.

Clearly I need to spend a lot more time looking into this.

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...