Re: [PHPTAL] Resetting a collection's index

2009-12-10 Thread romtek
2009/12/10 Kornel Lesiński > On 09-12-2009 at 23:22:11 romtek wrote: > > What is an approach to use if there's a need to iterate over the same >> collection more than once in a template? Currently, it seems that a >> collection's index/pointer is set at the end of the collection, and >> another

[PHPTAL] Re: PHP newline consumption

2009-12-10 Thread Richard Cernava
Kornel Lesiński writes: > I've fixed newline consumption issue. > > However still I advise against using PHPTAL for plaintext. For example > text in will have & interpreted properly, but it won't make > sense in e-mail. > Thanks, works great! __

Re: [PHPTAL] Re: PHP newline consumption

2009-12-10 Thread Kornel Lesiński
On 10-12-2009 at 17:59:22 Richard Cernava wrote: People, please! Stop wasting your time with PHPTAL and plaintext! It's deliberately *not* supported. http://phptal.org/wiki/doku.php/plaintext This is not a PHPTal issue per say, more than a PHP new line consumption issue, but PHPTal does

Re: [PHPTAL] Re: PHP newline consumption

2009-12-10 Thread Kornel Lesiński
On 10-12-2009 at 17:19:50 Richard Cernava wrote: I much agree, I don't like it either. ${variable1 | string:Line 1} Line 3 Renders: Line 1 Line 2 Line 3 TAL block seems to add another line break after Line 2, but variable does not. Ok, this

[PHPTAL] Re: PHP newline consumption

2009-12-10 Thread Richard Cernava
Kornel Lesiński writes: > > On 10-12-2009 at 03:18:56 romtek wrote: > > > This would also be useful for generating plain text email. > > People, please! Stop wasting your time with PHPTAL and plaintext! It's > deliberately *not* supported. > > http://phptal.org/wiki/doku.php/plaintext >

[PHPTAL] Re: PHP newline consumption

2009-12-10 Thread Richard Cernava
Kornel Lesiński writes: > > On 09-12-2009 at 23:06:40 Richard Cernava wrote: > > > I hate to bring this back up, but this does not seem to be fixed. I'm > > running PHPTal 1.2.2a1. > > > > inside function prepare() I added the preg_replace underneath $result = > > $this->parse(); to fix it f

[PHPTAL] Re: Variable access in tal:repeat

2009-12-10 Thread Bas
Kornel Lesiński writes: > > On 10-12-2009 at 14:32:58 Bas wrote: > > > If I create the following construct in a template PHPTal will throw an > > error, > > saying that the variable item cannot be found: > > > > > > tal:condition is evaluated before tal:repeat. In XML order of attributes

Re: [PHPTAL] Variable access in tal:repeat

2009-12-10 Thread Kornel Lesiński
On 10-12-2009 at 14:32:58 Bas wrote: If I create the following construct in a template PHPTal will throw an error, saying that the variable item cannot be found: tal:condition is evaluated before tal:repeat. In XML order of attributes in the source code doesn't matter, so TAL has to hav

[PHPTAL] Re: Variable access in tal:repeat

2009-12-10 Thread Bas
Bas writes: > > If I create the following construct in a template PHPTal will throw an error, > saying that the variable item cannot be found: > > > > The following, however, works just fine: > > > Sorry, the second line of code should read: ___

Re: [PHPTAL] Variable access in tal:repeat

2009-12-10 Thread Kornel Lesiński
On 10-12-2009 at 14:37:46 Fabian Deutsch wrote: Am Donnerstag, den 10.12.2009, 14:32 + schrieb Bas: If I create the following construct in a template PHPTal will throw an error, saying that the variable item cannot be found: did you try: That wouldn't work. repeat is for metadata a

Re: [PHPTAL] Variable access in tal:repeat

2009-12-10 Thread Fabian Deutsch
Am Donnerstag, den 10.12.2009, 14:32 + schrieb Bas: > If I create the following construct in a template PHPTal will throw an > error, > saying that the variable item cannot be found: > > tal:condition="not:item/someBooleanVar"> > did you try: -fabian > The following, however, works ju

[PHPTAL] Variable access in tal:repeat

2009-12-10 Thread Bas
If I create the following construct in a template PHPTal will throw an error, saying that the variable item cannot be found: The following, however, works just fine: I realise I can do this, to gain access to the variable anyway: But I would like to know the reasoning behind why th

Re: [PHPTAL] Re: PHP newline consumption

2009-12-10 Thread Kornel Lesiński
On 09-12-2009 at 23:06:40 Richard Cernava wrote: I hate to bring this back up, but this does not seem to be fixed. I'm running PHPTal 1.2.2a1. inside function prepare() I added the preg_replace underneath $result = $this->parse(); to fix it for now. $result = preg_replace('/\?>\r?\n/', "?>\

Re: [PHPTAL] Resetting a collection's index

2009-12-10 Thread Kornel Lesiński
On 09-12-2009 at 23:22:11 romtek wrote: What is an approach to use if there's a need to iterate over the same collection more than once in a template? Currently, it seems that a collection's index/pointer is set at the end of the collection, and another iteration isn't possible. As far as

Re: [PHPTAL] PHP newline consumption

2009-12-10 Thread Kornel Lesiński
On 10-12-2009 at 03:18:56 romtek wrote: This would also be useful for generating plain text email. People, please! Stop wasting your time with PHPTAL and plaintext! It's deliberately *not* supported. http://phptal.org/wiki/doku.php/plaintext -- regards, Kornel __