Brief Drupal Overview¶
Some of the images used on this page refer to Tripal v2. However, this Drupal overview applies equally well to both versions.
User Account Page¶
All users have an account page. When you first install Drupal, you are logged in as the administrator. The account page is simple for now. Click the My account link on the left sidebar. You’ll see a brief history for the user and an Edit tab. Users can edit their own information using the edit interface:
Creation of content in Drupal is very easy. Click the Add content link on the top administrative menu.
You’ll see two content types that come default with Drupal: Article and Basic Page. Here is where a user can add simple new pages to the website without knowledge of HTML or CSS. Click the Basic Page content type to see the interface for creating a new page:
You’ll notice at the top a Title field and a Body text box. All pages require a title and typically have some sort of content entered in the body. Additionally, there are other options that allow someone to enter HTML if they would like, save revisions of a page to preserve a history and to set authoring and publishing information.
For practice, try to create two new pages. A Home page and an About page for our site. First, create the home page and second create the about page. Add whatever text you like for the body.
To find any content that has been created on the site, click the Find Content link on the administrative menu at the top. The page shows all content available on the site. You will see the About and Home pages you created previously:
You’ll also notice a set of drop down boxes for filtering the content. For sites with many different content types and pages this helps to find content. You can use this list to click to view each page or to edit.
Click the Modules link on administrative menu at the top of the page:
Here is where you see the various modules that make up Drupal. Take a minute to scroll through the list and read some of the descriptions. The modules you see here are core modules that come with Drupal. Those that are checked come pre-enabled. Those that are not checked we will need to install them if we want to use them. To enable or “turn on” a module, check the box next to the desired module, then scroll to the bottom and click ‘Save configuration’. Your site will now have the functionality provided by that module. Alternatively, you can search for modules that may be useful to your intended site design at the Drupal module repository, https://drupal.org/project/project_module, and install them by clicking the Install New Module link. Finally, a 3rd method to install modules is by use of the drush tool. We will use drush for this tutorial.
Next, click the Appearance link on the administrative menu at the top of the page:
Here, you’ll see a list of themes that come with Drupal by default. Here you will see the default theme is called Bartik. This theme controls the appearance of all content on the site. You can easily change the way the site looks by changing the default theme to another theme. For this tutorial, we would like to use the Garland theme. If you scroll down you’ll see that one theme named Garland. click the link in the Garland theme section titled Enable and set default. The current look of the site is using the Garland theme.
Now, click the house icon in the top left. Our home page now uses the Garland theme:
Blocks in Drupal are used to provide additional content to any page that already exists. Examples of blocks might be a short overview of recent news items, Twitter feeds, links, recently added content, etc. The blocks interface can be found by navigating to Structure → Blocks using the top administrative menu.
On this page you’ll see a list of available blocks and where they are located within the site.
Here you can see that the Search form, Navigation, and User Login blocks are all on the left sidebar of Garland theme. There are also a list of other regions available that do not have any blocks and there are many blocks which are Disabled but could be added to a region on the page. For this tutorial, we would like for blocks to appear on the right sidebar rather than the left sidebar. Therefore, change the Search form, Navigation, and User Login to all use the right sidebar by changing the drop down box next to each one. When done, click the Save Blocks button at the bottom. Now when we view our home page the navigation links, search form and user login box (not shown while logged in) all appear on the right side:
As mentioned previously, the URL paths for our pages have node/1 and node/2 in the address. This is not very intuitive for site visitors.
To set a path, click on our new About page in the new menu link at the top and click the Edit tab (you may have to close the overlay to see the menu item). Scroll to the bottom of the edit page and you’ll see a section titled URL path setting. click to open this section. Since this is our about page, we simply want the URL to be http://localhost/about. To do this, just add the word “about” in the text box and click the Save button. You will now notice that the URL for this page is no longer http://localhost/node/2 but now http://localhost/about. Although, both links will still get you to our About page.
Now, use the instructions described above to set a path of ‘home’ for our home page.
There are many options under the Configuration link of the administrative menu at the top. Here we will only look at one of these at the moment–the Site Information page. Here you will find the settings we made when installing the site. You can change the site name, add a slogan, mission and footer text to the. The section titled Front Page is where we can tell Drupal to use our new Home page we created as the first page visitors see when they view the site. We want this to be the same as the home page we created and added a link for in the Main menu. In this text box enter the text node/1. Notice there is no preceding forward slash. Alternatively we could have used the URL path we added in the previous step. Let’s add a slogan: Resources for Community Genomics.
Now, click the Save configuration button at the bottom. You’ll now see the slogan now at the top of the page. Also, if you click the site name or the home icon at the top left we are now redirected to the new home page.
For this tutorial, we will not discuss in depth the user management infrastructure except to point out:
- User accounts can be created
- Users are assigned to various roles
- Permissions for those roles can be set to allow groups of users certain administrative rights or access to specific data.
Explore the Drupal User Management menu to see how users can be created, added to roles with specific permissions.