View previous topic :: View next topic |
Author |
Message |
douglassdavis Smarty Junkie
Joined: 21 Jan 2008 Posts: 541
|
|
Back to top |
|
douglassdavis Smarty Junkie
Joined: 21 Jan 2008 Posts: 541
|
Posted: Sun Feb 08, 2009 12:19 am Post subject: |
|
|
I like the way Smarty 3 is looking. A request re: the for tag.
I often used "first" and "last" in the smarty foreach loop.
For the for loop can we have a
$var@is_first is TRUE if the current {for} iteration is the initial one.
$var@is_last is TRUE if the current {for} iteration is the final one.
another thing. I saw that smarty 3 has a syntax for arrays.
for the sake of completeness, is there a way to append to an existing array? |
|
Back to top |
|
douglassdavis Smarty Junkie
Joined: 21 Jan 2008 Posts: 541
|
Posted: Fri Mar 20, 2009 2:22 pm Post subject: |
|
|
it would be nice if there was a way to unset an array element. |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Thu Apr 02, 2009 1:04 pm Post subject: |
|
|
The {for} tag ( {for $var in $array}) does now support:
$var@first is TRUE if the current {for} iteration is the initial one.
$var@last is TRUE if the current {for} iteration is the final one.
It's in the SVN now |
|
Back to top |
|
FractalizeR Smarty Rookie
Joined: 01 Nov 2003 Posts: 16
|
Posted: Wed Jun 10, 2009 10:48 am Post subject: |
|
|
Is that possible to create a subforum for Smarty3 disscussion? This topic became just a huge mess of information and new users are unlikely to join a conversation because that requires reading a whole 12 pages through...
I even can't find post with SVN information... Need to go through pages and pages... _________________ Things are changing,
But nothing changes,
And still there are changes |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Wed Jun 10, 2009 12:45 pm Post subject: |
|
|
FractalizeR wrote: | Is that possible to create a subforum for Smarty3 disscussion? This topic became just a huge mess of information and new users are unlikely to join a conversation because that requires reading a whole 12 pages through...
I even can't find post with SVN information... Need to go through pages and pages... |
There is:
http://www.phpinsider.com/smarty-forum/viewforum.php?f=29
SVN info is in the Smarty 3 README which can be found on the Smarty.net main page news. |
|
Back to top |
|
Martin1982 Smarty n00b
Joined: 11 Dec 2009 Posts: 1
|
Posted: Fri Dec 11, 2009 11:05 pm Post subject: |
|
|
maybe this is not within the scope of Smarty for now but I would like to see camel case formatting for variable names. I guess many developers who use phpUnderControl or the PEAR PHP_Codesniffer will notice messages like;
Code: |
Variable "error_reporting" is not in valid camel caps format
Variable "template_dir" is not in valid camel caps format
Variable "compile_dir" is not in valid camel caps format
|
when implementing Smarty. |
|
Back to top |
|
tonga Smarty n00b
Joined: 16 Aug 2010 Posts: 1
|
Posted: Mon Aug 16, 2010 11:47 am Post subject: Smarty Development |
|
|
We would start with a very minimal Smarty class -- basically just enough functionality to implement a load method which imports additional facilities at runtime (modules). Overriding __call on the base Smarty class would allow us to make the (concrete) module methods look and act like standard methods on the Smarty object (by forwarding). Modules would be derived from a special class which overrides __get and __set to use properties held in a third object (a property-bag). The Smarty object would maintain a container of property-bags and modules would be initialized by passing them reference(s) to appropriate property-bags. |
|
Back to top |
|
|