[consulting] Challenging an Assumption About What an Easy tpl.php Looks Like

David Hazel dave at hazelconsulting.com
Mon Oct 12 03:02:15 UTC 2009


While "easier to read" is probably a personal preference, it can be a real
pain to track down extra/missing single quotes.

On Sun, Oct 11, 2009 at 7:46 PM, Shai Gluskin <shai at content2zero.com> wrote:

> Gang,
>
> Every tpl.php file that I've seen in any theme is written in html with php
> interspersed for putting in variables. I think part of the reasoning for
> this approach is that it would be easier for non-geek designers to read such
> pages.
>
> I want to challenge that. I think all those php open-close and all the
> "print" commands makes for very hard-to-read code. Tonight, as an
> experiment, I rewrote the node.tpl.php file from Zen from html to php. I
> think it is a lot easier to read. And it's sure a lot easier to comment.
>
> I pasted my rewritten version and the original from Zen onto a pastebin:
> http://pastebin.ca/1614186
>
> Anyway, I'd be curious what other's opinions are on this.
>
> best,
>
> Shai
>
> _______________________________________________
> consulting mailing list
> consulting at drupal.org
> http://lists.drupal.org/mailman/listinfo/consulting
>
>


-- 
Email is not a secure form of communication!

Drupal Consultant
http://www.hazelconsulting.com/
253.686.0296
dave at hazelconsulting.com
skype: hazelconsulting
gtalk:kananii
http://www.facebook.com/davidhazel
ICQ: 366587185
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/consulting/attachments/20091011/2018ff3d/attachment.html 


More information about the consulting mailing list