[development] proposal for theming nodes

Bèr Kessels ber at webschuur.com
Wed Dec 14 15:32:47 UTC 2005


way too often i have to hack modules or even core (upload) to make it *not* 
append HTML to $node->body.

I think this practice of appending stuff to the body is very bad, since it 
makes it impossible to add thatdata elsewhere, without duplication.

I think that teh best option is an additional variable in $node
containing structured data added by all the modules. 
$node->extra->upload could, for example contain that uplaod/attachement table, 
that is now hardcoded to the body.

In the very very end, the theme_node will iterate over all these ->extra 's 
and append them to teh body.

Now, the code, the patch, should not be too hard to make, its just a few lines 
to the theme_node functions

The hard part, imho is to convert **all** core modules to use this. and with 
All i mean all :). Taxononomy, for example, should add its terms in there, 
while book module should add its navigation. 

The other thing is, that while this annoys me a huge lot, i just don't have 
time to get a patch going, untill at least end of Januari. 

Waht do others think

PS: Im not to sure about tis crossposting thing, but there are loads of theme 
and developers issues; is it safe to assume that interested parties at least 
read development? (so that we can keep this on development)
 PGP ber at webschuur.com
 PGP berkessels at gmx.net

More information about the development mailing list