[development] Node Rendering Debate

Moshe Weitzman weitzman at tejasa.com
Tue Jun 26 16:41:54 UTC 2007


The new user profile .tpl.php files include a line which prints this 
information for the themer. See modules/user/user_profile.tpl.php in 
HEAD, for example.

Amr Mostafa wrote:
> I don't think a UI is needed for assigning theme variables and I don't 
> think drupal_render($node['details']) is that much bad for themers, it 
> has an obvious name and function and I don't see why it would be hard to 
> describe it to themers.
> 
> The issue I see here (which you all are aware of I know, and the UI 
> solution is also trying to solve), and that always bugged me when trying 
> to explain it to themers is that how you know that $node['details'] is 
> available and has what you are looking for. I think a good solution is 
> to have a generated custom help page where it lists all the defined 
> variables and their descriptions. And by letting modules specify a 
> #description attribute when adding to the $node->content we can use that 
> to generate such a help page. I'm not up to date with the changes of the 
> theming layer in D6 so I'm not sure of the do-ability of this.
> 
> So to conclude, I think drupal_render() is great, a help page would 
> accomplish one of the UI goals but would spare us the trouble of naming 
> variables because as a themer, why would I care if the variable is 
> 'field_details' or 'mydetails'... etc. I will just use it whatever it's.
> 
> - Amr


More information about the development mailing list