hansv Posted July 22, 2015 Posted July 22, 2015 As a newbie, I accidently changed the admin template of the adminpage to the basic page template. Very, very stupid of me, of course! Now it is impossible to select the admin template because it is not visible. Is there a way to roll back my stupidy?
mr-fan Posted July 22, 2015 Posted July 22, 2015 lets try to solve id's of admin pages are reserved i think: admin root has id 2 pagetree has 3 modules has 21 setup has 22 login has 23 so how to aply a template to a page: http://cheatsheet.processwire.com/templates/template-methods/template-set-property-value/ example code to try: //the needed id of the admin page $id = 2; //get the page $admin_page = $pages->get($id); //set the template $admin_page->template->set("admin","admin.php"); haven't tried it but should work. just put this on the basic-page.php and call a page. If i'm wrong my someone experienced could help out. best regards mr-fan
bernhard Posted July 22, 2015 Posted July 22, 2015 hi hansv, welcome to processwire visit your site unter /admin/page go to setup > templates click on filters > show system templates > yes go to family > allowed templates for parents > unselect "admin" now you can select template "admin" for the page /admin then go to /admin > edit process: ProcessHome and then set family for admin template back to "admin" that you can't select it again hope that helps 3
hansv Posted July 22, 2015 Author Posted July 22, 2015 Hi mr-fan and BernardB Thx for the quick response. Solution of mr-fan had no effect. The solution of BernardB is realy perfect. I still need to learn a lot! best regards hansv 1
bernhard Posted July 22, 2015 Posted July 22, 2015 I still need to learn a lot! me too glad it helped!
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