Skip to content

Instantly share code, notes, and snippets.

@star-szr
Created September 23, 2011 14:18
Show Gist options
  • Save star-szr/1237463 to your computer and use it in GitHub Desktop.
Save star-szr/1237463 to your computer and use it in GitHub Desktop.
HTML5 block-level links for Drupal 7 blocks
<?php // Replace this: ?>
<?php print $content; ?>
<?php // With this: ?>
<?php if (isset($block->title_link)): ?>
<?php print l($content, $block->title_link, array('attributes' => array('title' => $block->title_link_title), 'html' => TRUE)); ?>
<?php else: ?>
<?php print $content; ?>
<?php endif; ?>
@star-szr
Copy link
Author

You also need the Block Title Link module. More information in the blog post: http://scottreev.es/html5-block-level-links-for-drupal-blocks-23836

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment