Re: [PHPTAL] Imploding tal:attributesfrom source array

2008-01-28 Thread Werner
=${myAssocArray} / I guess this is not the intended way, eh? The only alternative seems to be to write a very long tal:attributes definition that would cater for any possible attribute, but I;m sure there must be a better approach...? Kind Regards, Werner Anton Andrievskij wrote: In your PHP: *$imgAttr

Re: [PHPTAL] a bug?

2008-05-21 Thread Werner
(have to take a look first). Kind Regards, Werner anru chen wrote: Hi: I just picked up PHPTal as my template system last week, i thought i have found a bug. In PHPTal.php file, function executeMacro($path); after line $tpl = new PHPTAL($file); we should add : $tpl-setPhpCodeDestination

Re: [PHPTAL] Radio Buttons selection box

2008-06-29 Thread Werner
Hi Levi I'm posting an extract from one of my previous posts, I think it might give you an additional perspective to get out of the tal:conditional grip in your template code..? --- Begin Quote --- There are two ways that you can achieve the desired result: 1) The TAL-complaint way is to

Re: [PHPTAL] Avoid intermediate phptal files

2008-07-31 Thread Werner
names if your calling script executes templates coming from both directories at the same time. Kind Regards, Werner Iván -DrSlump- Montes wrote: Please feel free to modify it as you see fit. PHPTAL for SysAdmins: PHPTAL functions by generating PHP files from the template's logic, this means

Re: [PHPTAL] protecting html templates

2008-11-07 Thread Werner
/ document root / directory / whatever. Have fun, Werner Kornel Lesiński wrote: On 07-11-2008 at 09:38:13 Zbyněk Nevrlý [EMAIL PROTECTED] wrote: Hi, I am using PHPTAL for seperate business logic from presentation. So there are controllers, model classes and views (HTML templates). Problem

Re: [PHPTAL] Does stripComments() work?

2008-11-10 Thread Werner
Hi Roman I use it all the time, and it works fine (even on my last checked-our revision, which is not t old). How about a short example of how you used it? Kind Regards, Werner romtek wrote: Hi, I just used stripComments(true) on my template object but didn't see any effect

Re: [PHPTAL] Does stripComments() work?

2008-11-10 Thread Werner
penalty involved in implementing such a feature - Kornel, what do you think? Kind Regards, Werner romtek wrote: I think that changing the way a template is used (e.g. by modifying the _stripComments property) should trigger reparsing of the template automatically

Re: [PHPTAL] Re: Extension of templates - html or xml?

2009-03-30 Thread Werner
Hi Szymek Since the file extension does not really matter, I personally like to use something that my local development environment would understand best, which is (normally) .html or .xml. It's just easier to be able to view them in the appropriate application locally. Have fun, Werner

Re: [PHPTAL] PHPTAL 1.2.0 alpha - is this a bug or my fail?!

2009-05-14 Thread Werner
Regards, Werner Alister Cameron wrote: Gents, Perhaps I should stick to the production version but I hoped to help test the latest alpha. I've encountered an issue where it's not iterating thru a repeat, but I don't see what I'm doing wrong. Could I bother someone to have a look

Re: [PHPTAL] no error when var is not set ?

2009-05-15 Thread Werner
if pagetitle is not assigned: title tal:content=pagetitle|default/title However, this will output Some Page Title if pagetitle is not assigned: title tal:content=pagetitle|defaultSome Page Title/title Regards, Werner Levi Stanley wrote: One solution is to do this: title tal:content=pagetitle

Re: [PHPTAL] New PHPTAL website!

2009-06-01 Thread Werner
Hehehehe - you're a tough customer :) aaatoja wrote: Ok, I can make it smaller. What would you change with the top? Old site is pure and clean. When I first saw new one I thought why is it so sad? There's too much gray (unless it symbolizes the dullness of other projects), trifolium

Re: [PHPTAL] New PHPTAL website!

2009-06-01 Thread Werner
hand, some colour would not hurt, I suppose, but I don't think it's necessary - I still like the way it's now ;) Kind Regards, Werner Werner wrote: Hehehehe - you're a tough customer :) aaatoja wrote: Ok, I can make it smaller. What would you change with the top? Old site is pure

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

2009-06-27 Thread Werner
Hi Daniel Actually that's easy to achieve... In your php script: $tpl-numberOfCols = $numberOfCols; In your TAL template: table tr tal:block tal:repeat=cell numberOfCols td tal:content=cell/td /tal:block /tr /table Kind Regards, Werner Daniel Lima wrote: Hi

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

2009-06-27 Thread Werner
Of course, this works when $numberOfCols is an array :) Werner wrote: Hi Daniel Actually that's easy to achieve... In your php script: $tpl-numberOfCols = $numberOfCols; In your TAL template: table tr tal:block tal:repeat=cell numberOfCols td tal:content=cell/td

Re: [PHPTAL] Advanced TALES

2009-11-24 Thread Werner
In agreement with some of you, I also don't like having php expressions in my TAL templates. I was wondering if some arguments as an extension to modifiers cannot be done in a way that simply introduces a new separator to the existing syntax, e.g. just as tal expressions already makes use of

Re: [PHPTAL] Advanced TALES

2009-11-25 Thread Werner
:43:16 Werner li...@mollentze.co.za wrote: Given this, one can speculate about a more leal-life example, which even a new TAL user would easily be able to pick up: option tal:attributes=selected compare:item/value,saved/value tal:content=item/value/option Just my 2 cents ;) But how

Re: [PHPTAL] Advanced TALES

2009-11-26 Thread Werner
Kornel Lesiński wrote: That is possible currently: function phptal_tales_fullname($expr) { foreach(explode(',',$expr) as $subexpr) … } Fair enough, that's exactly how I approach some custom modifiers currently. I agree that building it (parameters) into the PHPTAL core only saves a few