Re: [PHPTAL] Variable interpolation inside structure'd expression

2013-05-30 Thread romtek
, romtek rom...@gmail.com wrote: Hi, I need help with something... I have the following in my template: div tal:content=structure product/descrfull product description here/div Values of product/descr are taken from a database. This works. However, I wanted to include a path

[PHPTAL] Variable interpolation inside structure'd expression

2013-05-29 Thread romtek
Hi, I need help with something... I have the following in my template: div tal:content=structure product/descrfull product description here/div Values of product/descr are taken from a database. This works. However, I wanted to include a path to the app in links like so: a

[PHPTAL] Please vote for PHPTAL support in Web Essentials extension for Visual Studio

2012-12-06 Thread romtek
http://webessentials.uservoice.com/forums/140520-general/suggestions/3409596-support-for-phptal Please vote even if you don't use VS. ___ PHPTAL mailing list PHPTAL@lists.motion-twin.com http://lists.motion-twin.com/mailman/listinfo/phptal

[PHPTAL] Paths to resources in templates

2011-11-03 Thread romtek
Hi, The nature of the development approach that I use is that paths to resources (images, CSS and JS files, etc.) relative to the template files during design time are different from those during run time. (I have templates in a separate folder, but my web app runs as index.php in the root

Re: [PHPTAL] Paths to resources in templates

2011-11-03 Thread romtek
Developer, 4over, Inc darre...@4over.com 818-246-1170 ext. 285 On Thu, Nov 3, 2011 at 1:00 AM, romtek rom...@gmail.com wrote: Hi, The nature of the development approach that I use is that paths to resources (images, CSS and JS files, etc.) relative to the template files during

Re: [PHPTAL] Minimized version of modifiers

2011-07-14 Thread romtek
On Mon, Jul 11, 2011 at 2:43 AM, Anton Andriyevskyy x.meg...@gmail.comwrote: Is there a way to easily define aliases use them for shorter syntax like tal:b instead of tal:block, tal:c instead of tal:content, tal:a instead of tal:attributes etc? It's becoming useful when you are kind of

[PHPTAL] PHPTAL interpreter takes too long to recover from encountering an unterminated HTML element

2011-07-14 Thread romtek
Hi, If my template code contains an unterminated HTML element (e.g. img src=stuff.jpg, br, etc.), PHP interpreter takes minutes to process a request and display an error message. And while doing that, it consumes lots of CPU and RAM. Could this be improved? A related request: considering that

Re: [PHPTAL] DocBook killer

2010-10-28 Thread romtek
2010/10/25 Kornel Lesiński kor...@aardvarkmedia.co.uk BTW: I wonder whether it's better to have one large file for entire documentation, or one file per chapter? I prefer using one file for the entire documentation because it helps me look for things of interest.

Re: AW: [PHPTAL] Re: AW: Logical operators in PHPTAL

2010-10-05 Thread romtek
It seems to me that some people here believe that introduction of logical operators to PHPTAL will force them (the people) to use these operators. It will not. It will simply give more flexibility to those who want it, and those who don't will be able to continue using PHPTAL the way they have.

Re: [PHPTAL] Re: AW: Logical operators in PHPTAL

2010-10-02 Thread romtek
On Fri, Oct 1, 2010 at 12:46 PM, Moritz Baumann flamin...@online.de wrote: http://phptal.org/wiki/doku.php/improvedtales I think the next step would be to work out syntax exactly: Hm, that page mentions a lot more than just logical operators. I guess that’s what the negative feedback

[PHPTAL] Generating multiple values for the class attribute dynamically

2010-10-02 Thread romtek
Hi, I sometimes need to use multiple values for the class attribute but can't seem to find a way to do this in PHPTAL if those values are to be determined at run-time. For example, tr tal:attributes=class php:item.isParent() ? 'parent' : null.../tr I also need to set an additional class value,

Re: [PHPTAL] optional attribute, based on another condition

2010-10-02 Thread romtek
2010/9/30 Ionuţ Matei johnu...@gmail.com Thanks! I didn't thought that ?: can be used in php:. If you haven't studied PHPTAL's manual thoroughly, I recommend that you do. E.g., see http://phptal.org/manual/en/#tal-attributes. ___ PHPTAL mailing

Re: [PHPTAL] A counterpart of true: modifier

2010-09-28 Thread romtek
2010/9/27 Kornel Lesiński kor...@aardvarkmedia.co.uk not:true: works exists: exists :) I didn't know it was possible to stack modifiers. Thanks! ___ PHPTAL mailing list PHPTAL@lists.motion-twin.com

[PHPTAL] Logical operators in PHPTAL

2010-09-28 Thread romtek
Hi, I'd like to be able to use a bit more simple logic in my templates. Being able to use AND, OR, and NOT would be good. E.g. tal:condition=event/featured AND event/upcoming, tal:condition=NOT event/featured AND event/upcoming I remember there was an activity to extend the library to make

[PHPTAL] A counterpart of true: modifier

2010-09-26 Thread romtek
Hi, PHPTAL offers PHPTALES modifier true: (equivalent of !empty()). I find it very useful. I would really like to have its opposite. Perhaps, false:. But I think that not: should be an equivalent of empty(). This would allow us not to have to check for a variable's existence prior to checking its

Re: [PHPTAL] PHPTAL and form macros

2010-08-23 Thread romtek
For me, the biggest benefit of using PHPTAL is being able to view the code in WYSIWYG programs. Having a template system in which there are many macros calling each other on several levels defeats this purpose. I think that in some cases using pure PHP code may be a better way. The topic being

Re: [PHPTAL] require_once vs autoloading

2010-06-05 Thread romtek
On Tue, Jun 1, 2010 at 11:10 PM, Tjerk Meesters tjerk.meest...@gmail.comwrote: I could be wrong here, but I think it's not so much any problem with require_once as it is to reduce memory consumption while using the library. This happens when developers only use 30% of the library and yet the

[PHPTAL] require_once vs autoloading

2010-06-01 Thread romtek
Kornel, I've noticed this item on phptal.org: Removed all require_once and switched to autoloading. What are the problems with using require_once? Roman ___ PHPTAL mailing list PHPTAL@lists.motion-twin.com

Re: [PHPTAL] Spelling mistakes in the manual

2010-05-30 Thread romtek
On Sun, May 30, 2010 at 6:40 AM, Alex a...@xplodinghead.org wrote: It should be omited instead of ommited. Omitted :) ___ PHPTAL mailing list PHPTAL@lists.motion-twin.com http://lists.motion-twin.com/mailman/listinfo/phptal

Re: [PHPTAL] tal:attributes question - reducing this statement

2010-03-22 Thread romtek
It (true:) will be very helpful. I've resorted to PHP in cases when true: would've been useful. Has it been available for a long time? On Mon, Mar 22, 2010 at 5:49 AM, Kornel Lesinski kor...@aardvarkmedia.co.uk wrote: On 20 Mar 2010, at 04:35, romtek wrote: function phptal_tales_erorrclass

Re: [PHPTAL] tal:attributes question - reducing this statement

2010-03-19 Thread romtek
2010/3/17 Kornel Lesiński kor...@aardvarkmedia.co.uk function phptal_tales_erorrclass($fieldname, $nothrow) { return phptal_tales('true:error/'.$fieldname, $nothrow). ? 'error' : NULL; } label class=${errorclass:first_name} labelbox I've noticed true: there. Is true one of PHPTALES?

Re: [PHPTAL] Does stripComments() work?

2010-03-13 Thread romtek
2009/10/28 Kornel Lesiński kor...@aardvarkmedia.co.uk On 28.10.2009, at 23:37, romtek wrote: I have to return to this topic after upgrading to PHPTAL 1.2.1. I can't get this method to work. Passing true leads to an error (Fatal error: Class 'PHPTAL_PreFilter' not found). Passing false

[PHPTAL] PHPTAL template for a calendar view?

2010-02-09 Thread romtek
Hi, Has anyone created and could share a template for a calendar view similar to one on http://davidwalsh.name/dw-content/php-calendar.php? Roman ___ PHPTAL mailing list PHPTAL@lists.motion-twin.com http://lists.motion-twin.com/mailman/listinfo/phptal

Re: [PHPTAL] There is no namespace declared error in v. 1.2.1

2010-01-30 Thread romtek
2010/1/27 Kornel Lesiński kor...@aardvarkmedia.co.uk On 27-01-2010 at 08:39:36 Murat Çorlu muratco...@gmail.com wrote: Is there a simple way to define a custom namespace globally for all of our templates like tal and metal namespaces? No, and I'm not planning to add it. TAL namespaces are

Re: [PHPTAL] while loop in PHPTAL

2009-12-30 Thread romtek
2009/12/30 Kornel Lesiński kor...@aardvarkmedia.co.uk On 29-12-2009 at 22:06:13 romtek rom...@gmail.com wrote: I was looking for a more elegant way to generate grids using PHPTAL that what I've been using and stumbled upon this post: http://lists.motion-twin.com/pipermail/phptal/2007

[PHPTAL] while loop in PHPTAL

2009-12-29 Thread romtek
I was looking for a more elegant way to generate grids using PHPTAL that what I've been using and stumbled upon this post: http://lists.motion-twin.com/pipermail/phptal/2007-February/000730.html. In it, Aaron McClimont has proposed adding a while loop (and also dowhile)construct to PHPTAL. I think

[PHPTAL] Resetting a collection's index

2009-12-09 Thread romtek
Hi, 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. Using v. 1.2.1. Roman

Re: [PHPTAL] PHP newline consumption

2009-12-09 Thread romtek
This would also be useful for generating plain text email. On Wed, Dec 9, 2009 at 5:59 PM, Tjerk Meesters tjerk.meest...@gmail.comwrote: Just out of curiosity, why does this bother you? In (x)html newlines are at best considered one white-space. Are you using this inside pre ? On 12/10/09,

[PHPTAL] Accessing superglobals from within a template

2009-12-06 Thread romtek
Hi, I'd like to be able to access superglobals from within a template, but it seems impossible now. Is there a way to do it? Roman ___ PHPTAL mailing list PHPTAL@lists.motion-twin.com http://lists.motion-twin.com/mailman/listinfo/phptal

Re: [PHPTAL] Accessing superglobals from within a template

2009-12-06 Thread romtek
2009/12/6 Kornel Lesiński kor...@aardvarkmedia.co.uk On 06.12.2009, at 12:25, romtek wrote: I'd like to be able to access superglobals from within a template, but it seems impossible now. Is there a way to do it? You can use either php:_POST['foo'] or $phptal-post = $_POST; and post

Re: [PHPTAL] Advanced TALES

2009-11-24 Thread romtek
I'd like TALES to be made more powerful. The changes won't affect those who don't want to use the new capabilities, so I don't see any harm in extending TALES. ___ PHPTAL mailing list PHPTAL@lists.motion-twin.com

Re: [PHPTAL] There is no namespace declared error in v. 1.2.1

2009-11-12 Thread romtek
2009/11/12 Kornel Lesiński kor...@aardvarkmedia.co.uk xmlns stops working when you close element. tal:block xmlns:fb=whatever/ does nothing. tal:block xmlns:fb=whatever fb:fan/ /tal:block should work. It worked. Thank you. ___ PHPTAL

Re: [PHPTAL] Re: PHPTAL writes DOCTYPE twice

2009-10-28 Thread romtek
2009/9/2 Szymek Przybył apocalyp...@gmail.com Hi Murat! Just remove DOCTYPE info from second template, it should be only in main template. I also find it very useful to have DOCTYPE in all my template secondary files. This helps me during their development.

Re: [PHPTAL] Does stripComments() work?

2009-10-28 Thread romtek
Hi, I have to return to this topic after upgrading to PHPTAL 1.2.1. I can't get this method to work. Passing true leads to an error (Fatal error: Class 'PHPTAL_PreFilter' not found). Passing false leads to no effect -- comment remain in the output. (I've modified my template to make sure it got

Re: [PHPTAL] Re: PHPTAL writes DOCTYPE twice

2009-10-28 Thread romtek
2009/10/28 Kornel Lesiński kor...@aardvarkmedia.co.uk On 28.10.2009, at 20:48, romtek wrote: 2009/9/2 Szymek Przybył apocalyp...@gmail.com Hi Murat! Just remove DOCTYPE info from second template, it should be only in main template. I also find it very useful to have DOCTYPE in all my

Re: [PHPTAL] question re: calling methods with parameters

2009-09-09 Thread romtek
Hi, I have a question on the same topic but with somewhat different details. div tal:repeat=item collection div tal:content=php: someFunction(item.id)/div /div That doesn't work for me. The only way to get what I want is to use tal:define to define a variable set to item.id and pass it to

Re: [PHPTAL] PHPTAL and PHP frameworks

2009-07-06 Thread romtek
On Sun, Jul 5, 2009 at 2:37 AM, Feli aaat...@o2.pl wrote: If You're interested in Zend Framework here's an article with examples (including Zend_Application) =

[PHPTAL] PHPTAL and PHP frameworks

2009-07-04 Thread romtek
Hi, all, I like to use PHPTAL for creating views. And now I would like to try to use a good PHP framework to reduce time and efforts on some tasks. Others must have researched frameworks, and even used some of them, and could share their experiences. I would like to know which ones are difficult

Re: [PHPTAL] Define and reset Increment counter in PHPTAL.

2009-06-27 Thread romtek
On Fri, Jun 26, 2009 at 10:04 PM, Daniel Lima daniel.l...@cilens.infowrote: echo /trtd; //closes a table row and create a new column And create a new row as well (prior to creating a new column)? ___ PHPTAL mailing list PHPTAL@lists.motion-twin.com

Re: [PHPTAL] New PHPTAL website!

2009-06-01 Thread romtek
I support everything Werner said in his elaborated reply. I think using 1em for font-size is correct as it uses the browser's default value. If it's too much for somebody, he can reduce the default value. But the default is there for a reason, and it's nice for a web designer to respect users'

Re: [PHPTAL] PHPTAL 1.2.0 alpha

2009-04-28 Thread romtek
2009/4/28 Kornel Lesiński kor...@aardvarkmedia.co.uk OK, I've given up on require() and changed it all to require_once(). Is there ever a reason to use require() to include code (not text)? ___ PHPTAL mailing list PHPTAL@lists.motion-twin.com

Re: [PHPTAL] Repeat scope issue

2009-02-28 Thread romtek
It works exactly as things work in PHP. In PHP, variables defined before constructs like foreach() and while() are available inside those constructs. PHPTAL's *repeat* block is similar to those PHP constructs. There's no block scope in PHP. What I'd like to have is a separate scope for a macro,

[PHPTAL] Re: Dynamic allocation of objects inside PHPTAL templates

2009-02-17 Thread romtek
On Tue, Feb 10, 2009 at 2:55 PM, romtek rom...@gmail.com wrote: Hi, I've tried to dynamically allocate an object inside a template and gotten errors. The following gets generated in the compiled code: *$ctx-new* GuestList(null, $ctx-event-guestlist_id). The bold part won't work, obviously

[PHPTAL] Dynamic allocation of objects inside PHPTAL templates

2009-02-10 Thread romtek
Hi, I've tried to dynamically allocate an object inside a template and gotten errors. The following gets generated in the compiled code: *$ctx-new* GuestList(null, $ctx-event-guestlist_id). The bold part won't work, obviously. It currently seems impossible to do. Is it? Thanks Roman

Re: [PHPTAL] default macro file

2009-01-30 Thread romtek
On Fri, Jan 30, 2009 at 4:57 AM, Kornel Lesiński kor...@aardvarkmedia.co.uk wrote: On 30-01-2009 at 03:13:16 romtek rom...@gmail.com wrote: Assuming that unwinding when handling exceptions is more time consuming than using if/else mechanism, wouldn't it be better to build this ability

Re: [PHPTAL] ?Bug - setSource doesn't reset the template

2008-11-17 Thread romtek
On Mon, Nov 17, 2008 at 4:18 AM, Kornel Lesiński [EMAIL PROTECTED] wrote: On 16-11-2008 at 08:24:11 Dave Looker [EMAIL PROTECTED] wrote: I needed to generate several templates all using the same set of data so I populated a single template and then reset the template before each execute.

Re: [PHPTAL] Does stripComments() work?

2008-11-10 Thread romtek
On Mon, Nov 10, 2008 at 6:21 AM, Kornel Lesiński [EMAIL PROTECTED] wrote: On 10-11-2008 at 08:26:02 romtek [EMAIL PROTECTED] wrote: I just used stripComments(true) on my template object but didn't see any effect. The output still contained HTML comments. Does this method not work or have I

Re: [PHPTAL] php if else syntax in phptal

2008-10-11 Thread romtek
I don't know what your Hebrew message says, but if I were you, I'd use 'style1' instead of 'style1''. Roman On Sat, Oct 11, 2008 at 6:30 PM, Eduard Gamonal [EMAIL PROTECTED] wrote: Hi, I'm developing a website using ccHost, and got trapped in a line: table tal:attributes=class php:

Re: [PHPTAL] Avoid intermediate phptal files

2008-08-20 Thread romtek
On Thu, Jul 31, 2008 at 2:56 PM, Werner [EMAIL PROTECTED] wrote: E.g. if 'first.tpl' template has a code destination of '/tmp/first/' and 'second.tpl' has a code destination of '/tmp/second/', then there is a change of having duplicate function names if your calling script executes templates