display suite completely clickable - 1 column

Public

Ever needed a completely clickable display? This is a display suite display for this.

First create the following structure in your active theme's folder (watch out for dashes and underscores):

Get raw version
text
  1. folder ds_layouts
  2. > folder ds_1col_linked
  3. > file ds-1col-linked.tpl.php
  4. > file ds_1col_linked.inc

contents of ds_1col_linked.inc

Get raw version
php
  1. <?php
  2. function ds_ds_1col_linked() {
  3. return array(
  4. 'label' => t('One Column linked'),
  5. 'regions' => array(
  6. 'ds_content' => t('Content'),
  7. ),
  8. );
  9. }

contents of ds-col-linked.tpl.php

Get raw version
php
  1. <?php
  2.  
  3. /**
  4.  * @file
  5.  * Linked 1 column template.
  6.  */
  7. ?>
  8.  
  9. <<?php print $ds_content_wrapper; print $layout_attributes; ?> class="ds-1col-linked <?php print $classes;?> clearfix">
  10.  
  11. <?php if (isset($title_suffix['contextual_links'])): ?>
  12. <?php print render($title_suffix['contextual_links']); ?>
  13. <?php endif; ?>
  14.  
  15. <?php if (isset($variables['node_url'])): ?>
  16. <a class="wrap-link" href="<?php print $variables['node_url']; ?>">
  17. <?php endif; ?>
  18.  
  19. <?php print $ds_content; ?>
  20.  
  21. <?php if (isset($variables['node_url'])): ?>
  22. </a>
  23. <?php endif; ?>
  24. </<?php print $ds_content_wrapper ?>>
  25.  
  26. <?php if (!empty($drupal_render_children)): ?>
  27. <?php print $drupal_render_children ?>
  28. <?php endif; ?>