[development] Node Rendering Debate

Earl Miles merlin at logrus.com
Thu Jun 21 19:25:46 UTC 2007

I should've forked this on my original post. I apologize for not doing that, 
and request everyone reply to this thread instead.

Jeff Eaton wrote:
> On Jun 21, 2007, at 2:50 PM, Robin Monks wrote:
>> I also disagree with FAPI.  I know how hard that'll be for a non-PHP 
>> developer to use when themeing a site...
> ...
>> Can we get some examples of how it might be used by a themer?
> For example:
> <span class="my_field"><?php print 
> check_format($node->content['field_details'][0]['value'], 
> $node->content['field_details'][0]['format']) ?></span>
> Vs.
> <span class="my_field"><?php print drupal_render($node['details']) 
> ?></span>
> The latter is what we do now when we need something more granular than 
> the $content variable. The latter is what a cleanly renderable node 
> would give us.
> --Jeff

Vs, with my proposal:

[assuming I've set the CCK field 'myfield' to show up in the $my_field variable 
in the theoretical UI that will exist for this]

<span class="my_field"><?php print $my_field;?></span>

More information about the development mailing list