02-26-2009, 01:39 AM
|
#4 (permalink)
|
|
La Vida es Sueño
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
|
The gripe I have with Smarty and other such template engines is precisely what has been mentioned! Why should we learn another seemingly differently language? Why are they creating yet another language for us to use when we have so many already at our disposal?
In my personal opinion, PHP is most certainly more than capable of handling this type of thing. However, I use the other syntax for the conditionals. Which is the following:
Code:
<?php if ($myVariable): ?>
<b>My variable has been set!</b>
<?php endif; ?>
For certain things, such as alternate row colours, I have created myself a class called a Zebra class. I am not sure where I got that name from, it must be my over-active imagination once again! And simply call it like below. You are even able to specify conditionals for a different row colour.
html4strict Code:
<div class="<?php echo TalkPHP_Zebra::getNext(); ?>">TalkPHP loves you.</div>
I don't see why people choose to use Smarty? Perhaps somebody could explain this to me.
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
|
|
|