[development] Building $node->body with arrays like FAPI for viewing

Bèr Kessels ber at webschuur.com
Fri Jul 14 17:12:37 UTC 2006

Are you aware of the fact that $node is available with all its metadata, like 
$node->content_driving_directions (when using CCK)?
And that PHPtemplate offers these as variables: $content_driving_directions 
wehn using CCK.

IMO, it is far ùmore rewarding to make these modules that append 
$node->body .= jst like that,smarter.

If I *only* $node->body .= '<div>' . $image .'</div>'; then I have created a 
badly designed module.

Doing a $node->body = theme('image_build_body', $node); (note the missing . 
dot! I create a whole new body in that theme function), i am doing a better 

But if in addition I present a $node->image =$image_file_obj; You, as themer 
have all the power. No hierarchival-fapi-like Array will help me any more. 

Summary: Let us find the contribs that are badly coded and improve these. But 
let's please stop this overengineering fapi-array-complexity-drive. :)

Fapi is causing enough pain as it is, IMO. No need for more of em in core. ;)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
Url : http://lists.drupal.org/pipermail/development/attachments/20060714/dcd546b0/attachment.pgp

More information about the development mailing list