Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.
Smarty 3.0: initial discussion
Goto page Previous  1, 2, 3 ... 10, 11, 12
 
Post new topic   Reply to topic    Smarty Forum Index -> Smarty Development
View previous topic :: View next topic  
Author Message
douglassdavis
Smarty Junkie


Joined: 21 Jan 2008
Posts: 539

PostPosted: Mon Nov 24, 2008 4:59 pm    Post subject: Reply with quote

i think add_url_param is very useful and something like this should be added to the distribution

http://www.phpinsider.com/smarty-forum/viewtopic.php?t=4356&highlight=&sid=10c2f9d4833648190afdfef53a87b040
Back to top
View user's profile Send private message
douglassdavis
Smarty Junkie


Joined: 21 Jan 2008
Posts: 539

PostPosted: Sun Feb 08, 2009 12:19 am    Post subject: Reply with quote

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
View user's profile Send private message
douglassdavis
Smarty Junkie


Joined: 21 Jan 2008
Posts: 539

PostPosted: Fri Mar 20, 2009 2:22 pm    Post subject: Reply with quote

it would be nice if there was a way to unset an array element.
Back to top
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 4631
Location: Hamburg / Germany

PostPosted: Thu Apr 02, 2009 1:04 pm    Post subject: Reply with quote

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
View user's profile Send private message
FractalizeR
Smarty Rookie


Joined: 01 Nov 2003
Posts: 16

PostPosted: Wed Jun 10, 2009 10:48 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7267
Location: Lincoln Nebraska, USA

PostPosted: Wed Jun 10, 2009 12:45 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Martin1982
Smarty n00b


Joined: 11 Dec 2009
Posts: 1

PostPosted: Fri Dec 11, 2009 11:05 pm    Post subject: Reply with quote

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
View user's profile Send private message
tonga
Smarty n00b


Joined: 16 Aug 2010
Posts: 1

PostPosted: Mon Aug 16, 2010 11:47 am    Post subject: Smarty Development Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Smarty Development All times are GMT
Goto page Previous  1, 2, 3 ... 10, 11, 12
Page 12 of 12

 
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