Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Switch & Case

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Feature Requests
View previous topic :: View next topic  
Author Message
openfly
Smarty n00b


Joined: 28 Nov 2006
Posts: 1
Location: NYC

PostPosted: Tue Nov 28, 2006 9:05 pm    Post subject: Switch & Case Reply with quote

Seems to be that in building structure templates switch and case statements would really help in making code more readable.

Not to mention switch and case have long been a part of standardized object oriented programming syntax.

Therefore I request this feature.

Thank you.
_________________
I hate web developers. I hate them all.
Back to top
View user's profile Send private message
gcphost
Smarty Rookie


Joined: 21 Jan 2006
Posts: 8

PostPosted: Sun Feb 25, 2007 5:46 am    Post subject: Reply with quote

I would LOVE to see this!

{switch var=$var}

{case value='value'}

{break}

{endswitch}

doesnt sound to hard its like {section} and {if} put together in a way Smile
Back to top
View user's profile Send private message
Hielke Hoeve
Smarty Elite


Joined: 06 Jan 2006
Posts: 406
Location: Netherlands

PostPosted: Sun Feb 25, 2007 10:51 am    Post subject: Reply with quote

It isn't that hard to make the block yourself. The manual and existing blocks provide enough information to atleast give it a try.
_________________
Debug XHTML Compliance
SmartyPaginate
Smarty License Questions
---
(About Unix) The learning curve is full of aha! moments, such as that glorious day that the full beauty of grep and, later, find is revealed in all its majesty. --- Robert Uhl <ruhl@4dv.net>
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Feature Requests All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP