Create a new custom ddblock theme

How to create your own custom dynamic display block theme

This page gives a detailed step by step instruction on how to create your own custom dynamic display block theme.

This example assumes that you want to make a new theme: custom40-a using the existing theme upright40.

  1. Go to directory: sites/all/[YOUR_THEME_NAME]/custom/modules/ddblock
  2. Create a copy of ddblock-cycle-block-content-upright40.tpl.php and save as ddblock-cycle-block-content-custom40-a.tpl.php.
  3. Edit ddblock-cycle-block-content-custom40-a.tpl.php
  4. Replace all occurrences of upright40 with custom40-a.
  5. Replace all occurrences of $template with $custom_template
    1. From the code:
        drupal_add_css($directory .'/custom/modules/ddblock/'.$template. '/ddblock-cycle-'.$template. '.css', 'template', 'all', FALSE); 

      Change to:

      drupal_add_css($directory .'/custom/modules/ddblock/'.$custom_template. '/ddblock-cycle-'.$custom_template. '.css', 'template', 'all', FALSE);

    2. From the code:
      <div id="ddblock-<?php print $delta ?>" class="ddblock-cycle-<?php print $template ?> clear-block">

      Change to:

      <div id="ddblock-<?php print $delta ?>" class="ddblock-cycle-<?php print $custom_template ?> clear-block">

  6. Create a copy of ddblock-cycle-pager-content-upright40.tpl.php and save as ddblock-cycle-pager-content-custom40-a.tpl.php.
  7. Edit ddblock-cycle-pager-content-custom40-a.tpl.php
  8. Replace all occurrences of upright40 to custom40-a.
  9. Create a copy of the upright40 directory and save as custom40-a.
  10. Goto the custom40-a directory
  11. Rename ddblock-cycle-upright40.css to ddblock-cycle-custom40-a.css.
  12. Edit ddblock-cycle-custom40-a.css
  13. Replace all occurrences of upright40 with custom40-a.
  14. You can now edit the template files and the css file to get your desired advanced dynamic display block layout.