A screenshot of the clean markup configuration fieldset for blocks.
A screenshot of the panels pane style selection form with Clean markup selected.
A screenshot of the Clean panels markup pane-style configuration form.
A screenshot of the Clean panels markup region-style configuration form.

Synopsis

This module aims to clean up, enhance and facilitate the customization of markup for Drupal core and several popular contrib modules such as Panels.

This module cleans up the wrapper and title HTML blocks, panel panes, and panel layouts; it does not clean up the HTML in the block/panel-pane content — please refer to the the Fences module for cleaning up field markup.

Features

As of version 2.x:

Blocks
From each individual block's configuration page (click "configure" on the block management screen), you can:
  • Disable or set the HTML5 element to use as the block wrapper,
  • Enable or disable an inner div,
  • Add classes to the outer block element,
  • Add custom attributes (i.e. role="navigation")
  • Set the HTML5 element to wrap the title,
  • Toggle whether the block title is displayed visually,
  • Disable or set the HTML5 element to wrap the content.
Panel panes
By changing the pane style to "Clean markup" (click the gear in the top-right of a pane and click "Change" under "Style"), you can:
  • Disable or set the HTML5 element to use as the pane wrapper,
  • Enable or disable an inner div,
  • Add classes to the outer pane wrapper,
  • Add custom attributes (i.e. role="navigation")
  • Set the HTML5 element to wrap the title,
  • Toggle whether the block title is displayed visually,
  • Disable or set the HTML5 element to wrap the content.
Panel regions
By changing the region style to "Clean markup" (click the gear in the top-left of a region and click "Change" under "Style"; or click "Display settings" on the panel itself), you can:
  • Disable or set the HTML5 element to use as the region wrapper,
  • Enable or disable an inner div,
  • Add classes to the outer region element,
  • Add custom attributes (i.e. role="navigation")
  • Enable or disable separator divs between panes in the region.
Panel Layouts
Layouts have been provided to take advantage of Clean Markup's ability to output the minimal amount of markup.
  1. One Column Clean: one region and single wrapper.
  2. One Column Reset: one region with no wrapper.
  3. Six pack: six regions.
  4. Myriad: five rows with four regions each that will output the absolute minimum markup. For example, a row with only one region will not output the row wrapper.

Requirements

Clean markup API
no dependencies.
Clean block markup
Block (in core) and Clean markup API
Clean panels markup
Panels and Clean markup API
Tokens (optional)
For using tokens in custom attributes.
  • If you want to clean up the markup of nodes, comments, taxonomy terms or users, check out Display Suite.
  • If you want to clean up the markup of fields, check out Fences.
  • If you want a really clean base theme, check out Mothership. Note that it will override Clean Markup's block template: you will have to copy Clean Markup's block.tpl.php to your sub-theme.

Roadmap

The 1.x branch contains only the Clean Block Markup module. Updates made to other branches that affect Clean Block Markup are being backported to this branch if possible.

The 2.x branch is the current stable branch, and contains both the Clean Block Markup and the Clean Panel Markup modules. Updates made to other branches that affect Clean Block Markup and Clean Panel markup are being backported to this branch if possible.

The 3.x branch is currently in development, and contains the Clean Block Markup, Clean Panel Markup and Clean Views Markup blocks.

We may also write something for Display Suite.

Known problems

We don't know of any problems at this time, so if you find one, please let us know by adding an issue!

Credits

Current co-maintainers:

See the bottom of this page for a list of organizations who have supported this project.

Gittip/Flattr/Paypal

The current co-maintainers are not currently accepting donations.

However, if you are willing to pay this module's co-maintainers to work on a bug that affects your project, or add a feature you require, please contact the co-maintainers directly using the contact form on their respective Drupal.org user account pages.

Help wanted!

Maintaining a project can be a lot of work, and the current co-maintainers of this project have full-time jobs, are not paid to maintain this module, and maintain a few other projects besides this one.

More co-maintainers to help triage issues, test patches for regressions, and add features would be greatly appreciated and would help us to resolve issues faster! If you are interested in becoming a co-maintainer, please open an issue asking to become one!

If you are aware of any other similar projects, please let me know by adding an issue!

Dependencies

This module does not depend on an external service (e.g. SaaS) to be fully functional.

Restrictions

This module has no artificial restrictions: the version available from Drupal.org has full functionality. No paid version is available.

Supporting organizations: 
Paid mparker17 to work on the module.
Paid mparker17, rhache, anandps to work on the module.

Project Information

Downloads