Skip to main content
edited tags
Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284
Source Link
Red
  • 31
  • 3

Display Suite Custom Template Issues

I've been using Display Suite for Drupal 7 (with Bamboo theme,) and I'm trying to build a layout template that contains 5 rows, so I can place the appropriate fields into each row, making all content nice and tidy.

I've followed the instructions here, but I'm doing something wrong: https://www.drupal.org/node/1098068

I'm guessing it has to do with the PHP code, because I'm getting errors involving my wrappers. Here is the PHP code for the tpl.php file:

<?php

/**
 * @file
 * Display Suite Bamboo custom template.
 */
?>
<<?php print $layout_wrapper; print $layout_attributes; ?> class="ds-bamboo <?php print $classes;?> clearfix">

  <?php if (isset($title_suffix['contextual_links'])): ?>
  <?php print render($title_suffix['contextual_links']); ?>
  <?php endif; ?>

  <<?php print $first_wrapper ?> class="introduction<?php print $first_classes; ?>">
    <?php print $first; ?>
  </<?php print $first_wrapper ?>>

  <<?php print $second_wrapper ?> class="entry1-group<?php print $second_classes; ?>">
    <?php print $second; ?>
  </<?php print $second_wrapper ?>>

  <<?php print $third_wrapper ?> class="entry2-group<?php print $third_classes; ?>">
    <?php print $third; ?>
  </<?php print $third_wrapper ?>>

<<?php print $fourth_wrapper ?> class="entry3-group<?php print $third_classes; ?>">
    <?php print $fourth; ?>
  </<?php print $fourth_wrapper ?>>

  <<?php print $footer_wrapper ?> class="group-footer<?php print $footer_classes; ?>">
    <?php print $footer; ?>
  </<?php print $footer_wrapper ?>>

</<?php print $layout_wrapper ?>>

<?php if (!empty($drupal_render_children)): ?>
  <?php print $drupal_render_children ?>
<?php endif; ?>

I think it is very possible I am also writing my .inc file incorrectly. Here is that code as well:

<?php
function ds_ds_bamboo () {
  return array(
    'label' => t('Bamboo DS'),
    'regions' => array(
     
        'introduction' => t('Introduction'),
    'entry1-group' => t('Entry 1'),
    'entry2-group' => t('Entry 2'),
    'entry3-group' => t('Entry 3'),
    'group-footer' => t('Footer'),
          ),
    // Add this line if there is a default css file.
    'css' => TRUE,
      );
}

I would be very appreciative if someone can set me in the right direction. Thank you!