In the last blog I pointed out differences in the path names for administering your Drupal 7 site. There are some changes that were not easy to categorize since they involve grouping some of the administration functions differently. I will cover those changes in this post.
Drupal 7 has moved things around a bit in the administrative interface. For those of you who are used to navigating directly through the URL, here are some of the changes:
Drupal 7 was officially released on January 7, 2011. One of the focuses of the new version was to make it easier to use. According to one of the points on the Drupal 7.0 Home page addressing the "easier to use" goal
I have created a site at http://theming.isaacsonwebdevelopment.com that delivers a reasonably complete presentation on theming. It even includes a small custom module that illustrates how to create a themable function and a theme that overrides that function.
You may register on the site to view the presentation in your choice of four different themes: Garland, a garland sub-theme, an Andreas03 sub-theme, and a Fusion sub-theme. The Fusion sub-theme implements the theme function override.
Template files are what Drupal uses to determine how to render the HTML for a page. When you wish to create a custom theme, there are several files you will likely include in your theme's directory:
- page.tpl.php - this controls the overall look and feel of your site (slight change for Drupal 7). For those of you who have coded sites with HTML (and CSS), this is like the index.html page you created.
- node.tpl.php - this controls how a node is built
There is only one file you must create in order to define your first custom theme: the ".info" file. Create a new subdirectory somewhere under your "sites" directory. For instance, try creating the subdirectory sites/all/themes/mycustomtheme. Inside that subdirectory you can create mycustomtheme.info. Note that you do not have to use the same name for the .info file, but it is common practice just to keep things logical.
Okay, so you are ready to start customizing your Drupal installation. Before you get started, there are some things you should know and follow.
- Drupal provides a directory structure that is designed to be used in a certain way. Notice the subdirectories below your Drupal root:
When you first create your Drupal site, you are asked to supply a user name and password. This first user (User ID 1) is the "root" user. This user has complete control over the site. So, you will want to give this first user a special name like admin, webmaster, or some other such signifier. Don't worry if you have already created this user with another name; you can update this user's name at any point. Just sign in and use the "My account" link from the Navigation menu or go to the path user/1. In general, you don't want to create any content under this profile.
Isn't it nice how Drupal provides a set of instructions on how to get started building your website? And isn't it neat how that disappears as soon as you create a piece of content that is promoted to the front page? To find out how Drupal does this, take a look under the hood by checking out the code at modules/node/node.module in function node_page_default() at line 1775 (as of Drupal 6.19).
The query statement that specifies to look only for content promoted to the front page is at line 1760 and looks like:
Okay. You finally got the courage to do some upgrades and/or installations of modules on your site and, like a good webmaster, put your site into off-line mode. Then you signed out. Now when you visit your site you get the message that the site is currently off-line.
How are you supposed to get back into the site to put it back online? Actually, it's quite easy. Just point your browser to
That wasn't so bad, was it?