Overview
The Semantic Blocks module enables the easy selection and use of the newer HTML5 elements as wrappers for blocks within the admin interface.
This gives site builders the ability to chose the element that encloses a block rather than rely on the hard coded element in the block template. This is done in the block add / edit form. If no element has been selected in the UI for that block it will default to div.
Installation
If your theme is already using a block.tpl.php template file, open this file in an editor and replace the opening and closing div tag with $tag. Remember to replace the closing tag! (If in doubt, look at the block.tpl.php file included in this module).
E.G change:
<div id="<?php print $block_html_id; ?>" class="<?php print $classes; ?>"<?php print $attributes; ?>>
......
</div>
to:
<<?php print $tag; ?> id="<?php print $block_html_id; ?>" class="<?php print $classes; ?>"<?php print $attributes; ?>>
....
</<?php print $tag; ?>>
If your theme doesn't use a block.tpl.php template file, you can enable the automatic override by visiting the modules configuration page (/admin/config/development/semantic_blocks).
Don't forget to clear the cache!
Warning
This module assumes you are dealing with browser support outside of the module. If you are not currently using the HTML5 shiv then older IE browsers will not display the new elements. See http://code.google.com/p/html5shiv/.
Recommended modules
Works well alongside the block_class module.
Thanks
Thanks to all those who helped review this module is the project application queue.
Project information
- Unsupported
Not supported (i.e. abandoned), and no longer being developed. Learn more about dealing with unsupported (abandoned) projects - No further development
No longer developed by its maintainers. - Module categories: Administration Tools, Content Editing Experience, Content Display
- 16 sites report using this module
- Created by ericgsmith on , updated
- Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.