<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Putting function calls in the themes page.tpl.php file would be a step backward for the theming system.</div><div><br class="webkit-block-placeholder"></div><div>For the page.tpl.php file the problem of only having the regions you want in the theme is solved in D5 with hook_regions and in D6 with the themes .info file.</div><div><br class="webkit-block-placeholder"></div><div>If we want to keep the separation of layers in drupals&nbsp;<a href="http://www.dossier-andreas.net/software_architecture/pac.html">PAC</a>&nbsp;like architecture and allow for any kind of&nbsp;plug-able&nbsp;presentation layer function calls in the page.tpl.php file isn't a good idea.</div><div><br class="webkit-block-placeholder"></div><div>The way we use theme('links', $primary_links) in the page.tpl.php files seems out of place. Shouldn't that be pushed to the preprocess function?</div><div><br class="webkit-block-placeholder"></div><div>Matt</div><div><br class="webkit-block-placeholder"></div><br><div><div>On Feb 23, 2008, at 3:17 PM, Larry Garfield wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">That's also the original logic behind the component module:<br><br><a href="http://drupal.org/project/component">http://drupal.org/project/component</a><br><br>That said, -1 to putting function calls directly in the template. &nbsp;They're not <br>portable to other template engines other than PHPTemplate. &nbsp;That's also <br>putting too much logic into a template, where it belongs in a theme/template <br>(preprocess) function. &nbsp;<br><br>On Saturday 23 February 2008, David Metzler wrote:<br><blockquote type="cite">Yep, I used something similar to this used to be possible in 4.7 and<br></blockquote><blockquote type="cite">I used it to create a region and put it in into a panel using Panels<br></blockquote><blockquote type="cite">so that I could still use block subscription and fole filtering logic<br></blockquote><blockquote type="cite">etc within a panel.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">For some reason it quit working in 4.7 most likely because I was<br></blockquote><blockquote type="cite">causing some system internal that shouldn't have been done.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Love to see this supported.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">On Feb 22, 2008, at 5:20 AM, Gábor Hojtsy wrote:<br></blockquote><blockquote type="cite"><blockquote type="cite">On Thu, Feb 21, 2008 at 8:20 PM, Earl Miles &lt;merlin@logrus.com&gt; wrote:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Gábor Hojtsy wrote:<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">What do you think?<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"> My one concern here is that because the block system is push, not<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">pull,<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"> all blocks in all regions are always generated, regardless of<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">whether<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"> the page needs them. That means we run the risk of degrading<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">performance<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"> by generating a whole bunch of material that we have no intention of<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"> displaying, unless we have some way for the theme to signal which<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"> regions it wishes to generate on any given template. And that's a<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">tough<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"> thing to do in the current system.<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"> This is one of the reasons I like the panels approach, but that's<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">still<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"> pretty far from being able to fully emulate the block system.<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Completely understood. I always disliked that PHPTemplate builds all<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">block regions regardless of needs. I used to use lots of conditionals<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">around block region bulilding in my pure PHP themes (before migrating<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">over to PHPTemplate not long ago, due to its other advantages). So<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">after all, a possible explosion of blocks / regions would require some<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">(more) benchmarking and thinking about block performance. (Given that<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">I am working primarily on better support for WYSIWYG right now, this<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">is not my top priority unfortunately).<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Gabor<br></blockquote></blockquote><br><br>-- <br>Larry Garfield<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>AIM: LOLG42<br>larry@garfieldtech.com<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>ICQ: 6817012<br><br>"If nature has made any one thing less susceptible than all others of <br>exclusive property, it is the action of the thinking power called an idea, <br>which an individual may exclusively possess as long as he keeps it to <br>himself; but the moment it is divulged, it forces itself into the possession <br>of every one, and the receiver cannot dispossess himself of it." &nbsp;-- Thomas <br>Jefferson<br></blockquote></div><br></body></html>