Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
Earlier, we learned that Drupal can have more than one theme enabled. A great use of this feature is when a site would like to have one theme for visitors, and one theme for its site administrators. In this video, I will show how to select an administration theme that only site admins will get to see, while everyone else will continue to see the default site theme. So to set the Drupal administration theme, we're going to be visiting a new screen that we have not seen yet in this course, and that's the Administration Theme page.
So starting from the Administer screen, we're going to click on Administration theme, which is its own link, and when we come to this page, we see two elements that we can set. The first is our choice of which theme will be the administration theme. So for this demo, let's choose Garland, and the option to view the Administration theme while editing content. I want to use this option as well. So check the box and click Save configuration. Now, nothing has changed for us yet, because Garland is actually also our site default name.
So now that we're changed the Administration theme, we can safely go choose another theme that everyone else will be able to view. To do that, we must go back to the Administer screen, so click Administer, then click Themes and now it will let you choose a new default site theme. So we're going to leave Garland enabled. So we're going to choose a theme that is different from Garland and one of the best choices for this demo will be Marvin. So we select Marvin to be enabled and to be the default theme.
Remember, leave Garland checked as enabled, go down and click Save configuration. And as we see, nothing has changed, but Drupal has set a message for us saying that the Administration theme is set to Garland. So this page remains unchanged. We will need to visit the homepage to see the Marvin theme being used for our front end. Now, if we go back, and just to prove it, I refresh my Administration screen, we're still in Garland. I go back.
Refresh the homepage. It's Marvin. So, let's click around and we see that Marvin is coming up for everything. But if we were to click the Administer link, we're back in Garland. So going back to the content, I want to show you now, when you edit a node, so I'm logged in and I get to see the tabs View and Edit. When I Edit this node, I'm now taken back to Garland, because I chose the option to use the Administration theme while editing content. So I'm not going to edit anything here. I am going to go back, click View and we see Marvin and this will be the last time we probably will get to use Marvin because everything we do from now on will be custom.
So let's close this screen and now let's set our Garland theme back to be the default theme and let's disable Marvin, because we won't need it any more. So go down, click Save configuration. A very important note about Administration themes. Before you install any new theme, you should definitely set the Administration theme first to a Drupal core theme, like Garland. The reason being, if you install a new theme without setting an Admin theme, you could potentially lock yourself out by accident.
This happens when the new theme does not have a particular feature or region expected by Drupal. By setting the Administration theme first, you avoid that scenario of getting locked out of your own website. Administration themes are not limited to the themes that come in Drupal core, and while any theme can be an Admin theme, I do recommend, strongly, that leaving Garland as the Administration theme is your best bet, since it's the most reliable theme for Administration screens.
Get unlimited access to all courses for just $25/month.Become a member
61 Video lessons · 96464 Viewers
56 Video lessons · 110219 Viewers
71 Video lessons · 79004 Viewers
131 Video lessons · 37897 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.