Closed (fixed)
Project:
Basic
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
21 Nov 2008 at 09:15 UTC
Updated:
29 Nov 2008 at 17:42 UTC
Jump to comment: Most recent
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
Comment #1
Anonymous (not verified) commentedWhy don't you just add it in the node.tpl.php ???
Comment #2
Gabriel R. commented'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.
Comment #3
Anonymous (not verified) commentedDoesn'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