Drupal Drupal Web Site Presentation

The way Drupal websites appear are determined by the theme used and the placement of blocks of content. Themes vary in appearance and functionality. For example the default Bartik theme provides a way to change the background color, however the Marinelli does not. The .css files must be edited to change the background color in the Marinelli theme. The theme PHP files can also be modified to change the appearance and function. You can also create your own theme or subtheme to use for the website.

Themes Presentation and Functionality

There are hundreds of Drupal themes with varying presentation and default functionality. None of the core Drupal 7.0 themes (Bartik, Garland, Stark) support drop-down menus by default. I wanted this feature, so I had three options:

  1. Use modules that support drop-down menus (Nice Menus, Superfish).

  2. Modify the theme code to contain drop-down menu logic.

  3. Use a theme that has built-in support for drop-down menus.

I decided to use a theme which has built-in support for drop-down menus and chose the Marinelli custom theme.

Changing the Drupal Theme

There are multiple ways you can change the Drupal default theme. In D7+ the ability to specify the URL for the compressed theme file simplified the procedure.

Procedure One D6- : Download, unzip, and transfer.
  1. Find the theme you wish to use at drupal.org.
  2. Go to theme home page and download the version of the theme matching the version of Drupal. After download, extract the file (c:\Drupal\hiking\marinelli-7.x-3.0-beta11).
  3. Upload the extracted folder (marinelli) to sites/all/themes. Note: the "theme" folder contains the core themes, use "sites/all/themes" to sort the non-core themes.
  4. Go to <Appearance>, find the new theme, enable and set as default.

Procedure Two D7+ : Install from compressed file URL.
  1. Find the theme you wish to use at drupal.org.
  2. Go to theme home page, find the down load file, right-click and select Copy Shortcut (http://ftp.drupal.org/files/projects/marinelli-7.x-3.0-beta11.zip).
  3. Go to <Appearance> and <Install new theme>.
  4. Past the URL from step #2 in the <Install from a URL> and select <Install>.
  5. After install is complete, find the new theme, enable and set as default.

Block Regions Screen Areas for Blocks of Content

Each theme has a number of screen areas for holding blocks of content. These areas are called block regions. Each block region has its own .css definitions so the appearance of the content can vary from region to region. Also some block regions will grow or shrink to accommodate the content of other regions. Since regions can interact with each other, the final page appearance depends upon the combination of regions used on the page. In <Structure><Blocks> you can select <Demonstrate block regions> and the screen will show the placement of all the block regions that are supported by the theme.

Blocks Content Groups

The web page content can be grouped into blocks. A block of content can be positioned in the theme's block regions. There are different types of blocks:

  1. Blocks created by modules. Examples include the search and navigation blocks.

  2. Blocks created because of modules. Examples include RSS feed blocks created because of the Aggregator module.

  3. User created blocks. To create your own blocks:
    • Go to <Structure><Block><Add block>.
    • Enter data for the block description, title, and body.
    • Specify the region for placement of the block.
    • Specify the pages on which you would like the block to appear. Such as checking the "Only the listed pages" option and entering <front> to make the block only appear on the front page.
Views Dynamic Combinations of Content

Views allow content to be dynamically combined which eliminates the need to maintain redundant data. Views is installed on about two-thirds of all Drupal sites. Views can be used to create charts and graphs as well as text data. When new data is added to the site, a view automatically collects the new data eliminating the need to statically maintain content to include the new data.

To enable views in D7 you need to install the modules:

  1. Views - the views core.
  2. CTools - Chaos Tool Suite.
Then enable the Views and Views UI modules. Select <Continue> to also enable the Chaos tools module required for the Views module. When finished there should now be a <Views> link in the <Structure> page.

Creating a View

To create a new view, follow this procedure:

  1. Identify the data you wish to place in the view.
  2. <Structure><View><Add new view>
  3. Enter View Name (All Trails).
  4. Check boxes for creating a Page and/or a Block as desired.
  5. Populate fields for Page/Block. Then <Continue and Edit>.
  6. <Filter Criteria> and select data to be in view <Apply for all displays>. Filter by Content type (Trails) and field values.
  7. Remove or set the field filter criteria as desired (View data at page bottom).
  8. Remove or set the field sort criteria as desired
  9. Select the data format (table, list, menu).
  10. Select format for individual field displays.
  11. Assign page or menu or block to region.