Body wrap filter
This project is not covered by Drupal’s security advisory policy.
Body wrap filter is a small theme-helper module which provides an input filter to wrap the contents of the node's body field in a div.
Sometimes, when I'm working with custom content types that may have many additional fields besides the title and body content, it can be tricky to style the content that was added to the body field. It can be done using a theme template (.tpl.php) and writing each field separately, but this can be tedious when a simple div wrapper around the body field would suffice.
An input filter seems like a neat way to do this.
There are no special requirements for this module, only that you follow the installation and configuration notes below.
Follow the normal procedure to install and enable a module.
See https://drupal.org/node/70151 for further information.
To get this filter working for any of your site's input formats:
- Navigate to the input formats admin page - admin/settings/filters/list
- Click the configure link next to the desired input format
- Select the checkbox next to 'Wrap body field content'
- Check if the HTML filter is selected (*)
- Save the configuration
(*) If you are also using the HTML filter, you should change the weight of the 'Wrap body field content' filter so that it is triggered after the HTML filter. Open the Rearrange tab to make this change.
Drupal 7 support
In Drupal 7, the node body is a field (since CCK's inclusion in core). This module is therefore not necessary in Drupal 7 as each field is already wrapped in a handy div!
|6.x-1.0-beta1||tar.gz (7.04 KB) | zip (7.79 KB)||2011年4月5日||发布说明||简 | 繁 | 更多|
|6.x-1.x-dev||tar.gz (8.09 KB) | zip (8.87 KB)||2013年9月30日||发布说明||简 | 繁 | 更多|