[development] proposal for theming nodes

Trae McCombs occy at occy.net
Wed Dec 14 16:48:47 UTC 2005


too bad I don't know PHP, as it would be nice for me to comprehend these 
theme changes you guys are discussing.  I think this is the disconnect 
we typically have between themers and developers.

People will carry on a conversation about something and perhaps it'll 
seem like a good idea at the time, until someone finally codes it, and 
then we go... "huh"? heh

I'm simply saying to keep us non-hackers in mind while having all these 
discussions.

Thank you, drive through.
Trae


Jose A. Reyero wrote:
> Bèr Kessels wrote:
> 
> 
>>Hi,
>>
>>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.
>>
>> 
>>
> 
> Yep, I agree, same problem here
> 
> 
>>I think that teh best option is an additional variable in $node
>>$node->extra 
>>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.
>>
>>
>> 
>>
> 
> First I would like to insist in that *all html* produced should be
> themeable.
> 
> About this specific issue, I think we could
> a) Just use themeable functions, that can be overridden, like a
> 'theme_upload_node_body' but, anyway, don't store it into node->body,
> but in node->output or similar
> b) Use that $node->extra->upload you propose but maybe better make it an
> array, $node->extra['upload'] so we can use a simple 'implode' at the
> end. Maybe weights could be useful here too
> 
> The ideal would be using both, themeable functions that produce
> structured data, but any of them used separately would just fix the
> problem. However, the way to go, thinking big, would be kind of
> 'generalized form API' that could be useful to build any object -page,
> block, node..- as structured data and then render it to HTML.
> 
> 
>>Waht do others think
>>Bèr
>>
>>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)
>> 
>>
> 
> 

-- 
Trae "occy" McCombs || http://occy.net/
       Founder - Themes.org // Linux.com
     CivicSpaceLabs - http://civicspacelabs.org/


More information about the development mailing list