Jump to content

admin template


hansv
 Share

Recommended Posts

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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 :)

  • Like 3
Link to comment
Share on other sites

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

  • Like 1
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...