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

Search found 8 matches
Smarty Forum Index
Author Message
  Topic: Switch statements
pynej

Replies: 7
Views: 59525

PostForum: Feature Requests   Posted: Tue Feb 09, 2010 5:05 pm   Subject: Switch statements
My original switch plugin is available for
{switch $myvar}
{case 1}
{case $var}
{break}
{case $myvar|my_modifyer break}
{default ...
  Topic: Switch control structures
pynej

Replies: 25
Views: 209409

PostForum: Feature Requests   Posted: Tue Feb 09, 2010 4:56 pm   Subject: Smarty 3 Switch Statment
I just updated the plug-in again to version 3.1 re-enabling support for short hand {switch $myvar} tags. This feature requires the inclusion of a load_plugin line in the user code before the template ...
  Topic: Switch control structures
pynej

Replies: 25
Views: 209409

PostForum: Feature Requests   Posted: Tue Feb 09, 2010 3:47 pm   Subject: Smarty 3 Switch Statment
An updated version of my switch plugin for Smarty 3 is available [url=http://pynej.blogspot.com/2010/02/switch-statment-for-smarty-3.html]here.
  Topic: Switch control structures
pynej

Replies: 25
Views: 209409

PostForum: Feature Requests   Posted: Sun Mar 09, 2008 4:53 am   Subject: Switch control structures
Added a {/case} tag. This is the same as {break}
  Topic: Switch control structures
pynej

Replies: 25
Views: 209409

PostForum: Feature Requests   Posted: Sat Mar 08, 2008 10:13 pm   Subject: Switch control structures
Ignore the last message. I have updated the code so that

{case logic break}
Code

will render as

{case logic}
Code
{break}


The changes can be fo ...
  Topic: Switch control structures
pynej

Replies: 25
Views: 209409

PostForum: Feature Requests   Posted: Sat Mar 08, 2008 8:52 pm   Subject: Notes:
As for the break attribute. Due to how the smarty syntax works, passing the break attribute DOESN'T cause the current case to automatically break, Rather it prints a break tag BEFORE the case take. ...
  Topic: Switch control structures
pynej

Replies: 25
Views: 209409

PostForum: Feature Requests   Posted: Fri Mar 07, 2008 5:21 pm   Subject: Working Smarty Switch Plugin: UPDATED
There is a complete and working switch plugin. It works exactly as a php switch and you can even use variables and modifiers for the conditions. Feel free to use it and let me know if you have and p ...
  Topic: problems with compiled filenames
pynej

Replies: 6
Views: 9162

PostForum: General   Posted: Fri Mar 07, 2008 5:20 pm   Subject: problems with compiled filenames
Thats a weird policy.
 
Page 1 of 1
All times are GMT
Jump to:  


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