How to Add Block Styles to Your GT Theme

Category
Drupal Version
Tags

The GT theme includes some pre-set design treatments for blocks (see lists below of "Body styles" and "Title styles").

All versions of the new GT Theme include the CSS to display these design treatments for blocks, or "block styles". However, you have to manually add these styles to your site via the GT Tools settings to make them available as options when adding/editing blocks.

Option 1: Import SQL code into your database

The fastest way to get the standard styles is to import this sql code into your block_classes table (via phpMyAdmin in your web hosting panel).

Option 2: Create styles manually in your site's administrative interface

Another way to get the standard styles is via the block style class options, which you'll find under the GT Tools options. This is located under the System link (Configuration -> System -> GT Tools if you're using the Administration Menu module).

You can use this same method to add new block designs for your GT SubTheme, using CSS class declarations in your SubTheme and adding block styles classes through the interface (as described above).

Remember, the "Class name" must:

  • exactly match that of the class declaration in your CSS style sheet (e.g. "promo-block"),
  • begin with a letter, and
  • contain only numbers, lowercase letters, hyphens, or underscores.

Default Class names

  • promo-block
  • related-info-block
  • icon-info-title
  • icon-link-title
  • icon-alert-title
  • icon-download-title

As of version 2.5 of the GT Theme, the following styles were added:

  • icon-mortar-board
  • icon-institution
  • block-title-bg-gt-blue
  • block-title-bg-gt-gold
  • block-title-bg-gray