Body wrap filter


This project is not covered by Drupal’s security advisory policy.

Introduction

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.

Requirements

There are no special requirements for this module, only that you follow the installation and configuration notes below.

Installation

Follow the normal procedure to install and enable a module.

See https://drupal.org/node/70151 for further information.

Configuration

To get this filter working for any of your site's input formats:

  1. Navigate to the input formats admin page - admin/settings/filters/list
  2. Click the configure link next to the desired input format
  3. Select the checkbox next to 'Wrap body field content'
  4. Check if the HTML filter is selected (*)
  5. 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!


Body wrap filter项目的Drush安装命令:复制到剪贴板

注:个别模块仍需开启相关子模块。
周安装量: 
69
维护状态: 
积极维护中
开发状态: 
积极开发中

推荐版本下载:

版本下载地址发布日期发布说明翻译下载
6.x-1.0-beta1tar.gz (7.04 KB) | zip (7.79 KB)2011年4月5日发布说明简 | 繁 | 更多

开发版本下载:

版本下载地址发布日期发布说明翻译下载
6.x-1.x-devtar.gz (8.09 KB) | zip (8.87 KB)2013年9月30日发布说明简 | 繁 | 更多