Hello,

on all my template customisations I add a div around each node's body field.
I created a bodywrapper.module that does just this, but it would make more sense to have this on the template.

Here what the module does:

/**
 * Wraps each node's BODY field in <div class="field field-node-body"> 
 * for better styling options. 
 */

function phptemplate_nodeapi(&$node, $op, $teaser, $page) {
	$node->content[body]['#value'] = "<div class=\"field field-node-body\">$node->content[body]['#value']</div>";
}

The code above doesn't work, it's from the module, but I think you understand where I'm going.

Thanks.

Comments

Anonymous’s picture

Status: Active » Postponed (maintainer needs more info)

Why don't you just add it in the node.tpl.php ???

Gabriel R.’s picture

'Cause it would have to be added to all custom node templates. Having it at the template level would just work.

I would appreciate any suggestion for making this work in template.tpl, if that's possible.

Anonymous’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

Doesn't seem like something that really is related to Basic in particular. Maybe you'll have more success and help in groups.drupal.org, like here for example :

http://groups.drupal.org/contributed-module-ideas

or here :

http://groups.drupal.org/theme-development

or also, but I would recoment not to use this module as it saves code in database, you can have a look at this :

http://drupal.org/project/contemplate

Good luck