<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV><DIV>On 21 Jun 2007, at 11:23 PM, Farsheed wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">+infinity for this. I really feel like template files</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">should only have straight variables and simple logic.</FONT></P> </BLOCKQUOTE></DIV><BR><DIV>In drupal 5 parlance (not really sure how drupal 6 does it yet) :</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>$vars = $node;</DIV><DIV>array_walk($vars, "drupal_render");</DIV><DIV>return _phptemplate_callback("node", array("node" =&gt; $node) + $vars);</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I am 100% against you needing to use an interface to assign variable names, because it makes</DIV><DIV>node template un-distributable, without distributing the additional configuration too.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Also, I don't think a drupal_render call over and above the already existing print call is too much to ask,</DIV><DIV>because quite frankly we are already going to be requiring it for localisation (ie: print t("Some text") ).</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Also. there's a difference between themers , and end users. Requiring an interface to be able to assign</DIV><DIV>variables is going to help the latter, but not the former. It's going to make their life more complicated.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>What I really think we should do, if we want to make an interface for the latter, is make a proper version of the contemplate</DIV><DIV>module, using the token replacement code (ie: use %my_field) in the text editor to place field, with a list of possible</DIV><DIV>tokens. </DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>That then translates to &lt;? print drupal_render($node['my_field']);?&gt; in the final template file it uses.</DIV></BODY></HTML>