|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
n2fole00 Smarty Rookie
Joined: 09 Jun 2020 Posts: 7
|
Posted: Tue Jun 09, 2020 9:00 am Post subject: Recommended tutorials for Smarty 3 |
|
|
I've just started at a company that uses Smarty. I was wondering if there is a particular tutorial you would recommend for S3? Most of the ones in Google's results are quite old (v2) and I'm not sure if they would be good to follow.
Thanks. |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Tue Jun 09, 2020 6:59 pm Post subject: |
|
|
Documentation for Smarty 3 is quite complete.
If you have any specific usage questions, just ask them. |
|
Back to top |
|
n2fole00 Smarty Rookie
Joined: 09 Jun 2020 Posts: 7
|
Posted: Wed Jun 10, 2020 8:17 am Post subject: |
|
|
Edit: Sorry, I found what I was looking for here https://www.smarty.net/docs/en/language.modifiers.tpl
Ignore the rest.
AnrDaemon wrote: | Documentation for Smarty 3 is quite complete.
If you have any specific usage questions, just ask them. |
Thanks. Actually, I have one. I was wondering where in the docs the info about the : (colon) is. For example I see Code: | {if $controller|in_array:array('someController')}active{/if} | in my codebase. It's a neat shortcut to Code: | in_array($current_item,$selected_array) | , but I would like to know a bit more about it and where else I can use it.
Thanks again |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Thu Jun 11, 2020 4:40 pm Post subject: |
|
|
You can use it anywhere. Modifier syntax is quite transparent.
Say, I often use (which is a direct equivalent to "print_r($var, 1)" ) for quick-and-dirty template debugging. |
|
Back to top |
|
n2fole00 Smarty Rookie
Joined: 09 Jun 2020 Posts: 7
|
Posted: Thu Jun 11, 2020 7:09 pm Post subject: |
|
|
Thanks for the tip |
|
Back to top |
|
|
|
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
|