[development] Node Rendering Debate

Sean Robertson seanr at ngpsoftware.com
Fri Jun 22 17:24:12 UTC 2007


This sounds like it will really make it harder to reuse themes, since 
you'd have to make sure the variables were all assigned the same.  If 
you had a dozen themers, you'd end up with a dozen ways of naming each 
variable.  I'd prefer things be kept as consistent across all Drupal 
installations as possible, so if I inherit another user's site, I don;t 
have to figure out how they did everything.



Earl Miles wrote:
> Derek Wright wrote:
>>
>> On Jun 21, 2007, at 12:25 PM, Earl Miles wrote:
>>
>>> [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>
>>
>> My large objection to this approach is that it makes namespace 
>> collisions inevitable.  That's the primary reason I started caring 
>> about this topic in the first place.  So, what happens when 4 
>> different modules think $node->pid is theirs, and someone tries this 
>> in a theme:
>>
>> <span class="pid"><?php print $pid;?></span>
>>
>> ?  This seems like a recipe for much badness and confusion, 
>> perpetuating the bugs we already have for developers down into the 
>> theme layer, too.  I agree with Adrian about the problems of relying 
>> on some UI for this, since that makes it basically impossible to 
>> distribute themes.
> 
> You have clearly missed the point:
> 
>  >> [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]
> 
> I'm the one setting the variables. Not the modules. It's designed to 
> avoid namespace collisions by taking the namespace away from the modules 
> entirely.

-- 
Sean Robertson
Web Developer
NGP Software, Inc.
seanr at ngpsoftware.com
(202) 686-9330
http://www.ngpsoftware.com



More information about the development mailing list