regesh Posted October 25, 2016 Share Posted October 25, 2016 I created custom admin page with link in top menu and set template for it. But opening it has another admin theme, not like is used in core admin pages. So here is two screen shots. Does anybody know how to solve it. And one more thing)) I included just small peace of code in this custom template for my admin page: <?php namespace ProcessWire; require($config->paths->adminTemplates . 'controller.php'); Thanks for advice! Link to comment Share on other sites More sharing options...
regesh Posted October 26, 2016 Author Share Posted October 26, 2016 So no one knows how to fix...??? Link to comment Share on other sites More sharing options...
LostKobrakai Posted October 26, 2016 Share Posted October 26, 2016 Why do you even include the old admin theme? Link to comment Share on other sites More sharing options...
kongondo Posted October 26, 2016 Share Posted October 26, 2016 @LostKobrakai, I'm not sure @regesh included it. I have seen this problem before, a long time ago, but can't find the relevant info at the moment.. Edit: Link to comment Share on other sites More sharing options...
regesh Posted October 26, 2016 Author Share Posted October 26, 2016 3 hours ago, LostKobrakai said: Why do you even include the old admin theme? I just copied contents of file admin.php in templates directory Even if i write: require($config->paths->modules . 'AdminTheme/AdminThemeDefault/controller.php'); Result is the same. Link to comment Share on other sites More sharing options...
szabesz Posted October 27, 2016 Share Posted October 27, 2016 Hi, It's not wrapped into the module, but certainly works, so this might help you: http://processwire-recipes.com/recipes/create-custom-admin-settings-page-link-in-admin-menu/ Link to comment Share on other sites More sharing options...
mn-martin Posted March 14, 2019 Share Posted March 14, 2019 I'm having the exact same problem. The intention to use a custom template for the job is to have additional fields together with the custom process. I also just copied / required the original admin.php template file. I thought it would make sense but it seems like this is not an option? Can you please shed some light on this @ryan Link to comment Share on other sites More sharing options...
Youbility Posted August 22, 2019 Share Posted August 22, 2019 Same problem, copying the admin.php template to create a a custom admin template with additional fields does not work unfortunately. The old admin theme steps in. Edit: Found a possible reason for this bug, but no way to fix it yet. The problem could rely in line 140 in core/admin.php: $initFile = $config->paths->adminTemplates . 'init.php'; With the default site/templates/admin.php file that value points to: /wire/modules/AdminTheme/AdminThemeUikit/init.php When using a custom admin template the value points to: /wire/templates-admin/init.php which then loads the wrong files. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now