The logic is that I'm doing many checks and want set or not set products
variable - does not matter it is object or array. I just wanted to write
less code by making PHPTAL template more flexible. So I'll not be worried to
always setup and initialize products object.
Anton
On Sat, May 31, 2008 at
how about check path first
tal:conditions = "exists: product/notEmpty"
then use tal:replace or tal:contents to output actully product?
so you can push that "and" logic into your business model rather that
wirte it in a view model
regards
On Sat, May 31, 2008 at 10:17 AM, Anton Andrievskij <[E
The aim is to avoid setting always products.
On Sat, May 31, 2008 at 12:03 AM, Christoph Frick <[EMAIL PROTECTED]>
wrote:
> On Fri, May 30, 2008 at 07:04:47PM +0300, Anton Andrievskij wrote:
>
> > How can I specify multiple conditions using AND logical operator and php:
> > for one of the parts?
On Fri, May 30, 2008 at 07:04:47PM +0300, Anton Andrievskij wrote:
> How can I specify multiple conditions using AND logical operator and php:
> for one of the parts?
>
> I'm trying this but does not works:
>
> tal:condition="exists: products AND php:count(products) == 0"
in python an empty lis
Sure I don't mind to share, it's just that I've been way to busy with
other projects and in its current state is not usable. I was in the
middle of a huge refactoring when I stopped working on it.
The repository is at:
http://svn.pollinimini.net/drtal/trunk
And generated documentation at:
http:
Am Freitag 30 Mai 2008 schrieb Kornel Lesinski:
> php:isset(var) is equivalent to exists:var (but not in more complex case
> of exists:var/prop - then you're out of luck ;)
php:isset(var['prop']) works fine in this case.
--
MfG, Christian Welzel
GPG-Key: http://www.camlann.de/key.asc
On Fri, 30 May 2008 17:59:58 +0100, Anton Andrievskij <[EMAIL PROTECTED]>
wrote:
PHPTAL rewrites code in php: expressions to use TAL variables, so it
will work fine.
Please can you explain a bit more about this? How it works?
There's a simple PHP parser that modifies the code (see
Php/Tr
On Fri, 30 May 2008 17:28:18 +0100, Iván -DrSlump- Montes
<[EMAIL PROTECTED]> wrote:
I've been trying to push for PHPTAL use in several projects in the
last years but I haven't been very successful. I ended up writing my
own version from scratch a couple of months ago, leveraging new PHP
5.3 f
I think it is better to get new developers with new programming logic to use
PHPTAL. Then you will have more strong and professional community. Smarty
must go to the syncope together with its old-type programmers.
As for me - I never used Smarty because I found it ugly and stupid the first
time I
>>> PHPTAL rewrites code in php: expressions to use TAL variables, so it
will work fine.
Please can you explain a bit more about this? How it works?
On Fri, May 30, 2008 at 7:47 PM, Kornel Lesinski <[EMAIL PROTECTED]>
wrote:
> On Fri, 30 May 2008 17:36:34 +0100, Anton Andrievskij <[EMAIL PROTECT
On Fri, 30 May 2008 15:29:10 +0100, Patrick Burke <[EMAIL PROTECTED]>
wrote:
I'm seeing PHPTAL at a tipping point. I wasn't able to get PHPTAL
into many environments in the last couple years because big, fat, ugly
Smarty was sitting in the templates directories already.
Perhaps writing Smar
On Fri, 30 May 2008 17:36:34 +0100, Anton Andrievskij <[EMAIL PROTECTED]>
wrote:
1. But then php will check if real "products" variable exists but not
tal-object's product property?
PHPTAL rewrites code in php: expressions to use TAL variables, so it will
work fine.
php:isset(var) is equ
I agree about 'marketing friendly' too.
PHPTAL guys, lets improve on this part. I'll help doing my best for this
task.
Anton
On Fri, May 30, 2008 at 7:28 PM, Iván -DrSlump- Montes <
[EMAIL PROTECTED]> wrote:
> I've been trying to push for PHPTAL use in several projects in the
> last years but I
1. But then php will check if real "products" variable exists but not
tal-object's product property?
2. Why it is bad idea to have some logical operands in PHPTAL then?
Thanks for your answer on my problem.
Anton
On Fri, May 30, 2008 at 7:22 PM, Kornel Lesinski <[EMAIL PROTECTED]>
wrote:
> On F
I've been trying to push for PHPTAL use in several projects in the
last years but I haven't been very successful. I ended up writing my
own version from scratch a couple of months ago, leveraging new PHP
5.3 features and the bundled XML parsers + Tidy for legacy templates.
The main point in implem
On Fri, 30 May 2008 17:04:47 +0100, Anton Andrievskij <[EMAIL PROTECTED]>
wrote:
How can I specify multiple conditions using AND logical operator and php:
for one of the parts?
I'm trying this but does not works:
tal:condition="exists: products AND php:count(products) == 0"
TALES doesn't h
Hi, guys.
How can I specify multiple conditions using AND logical operator and php:
for one of the parts?
I'm trying this but does not works:
tal:condition="exists: products AND php:count(products) == 0"
Thanks,
Anton
___
PHPTAL mailing list
PHPTAL@li
nterprise features that make it more known about to higher
>> level Development leads. It's true though.
>>
>> Hew
>>
>> On Fri, May 30, 2008 at 6:00 AM, <[EMAIL PROTECTED]>
>> wrote:
>> > Send PHPTAL mailing list submissions to
>> >
Am Freitag 30 Mai 2008 schrieb Kornel Lesinski:
> p_speed = ${php:json_encode(plane_speeds)}
Thanks for your hint to json_encode().
I didn't know this function as i normally try to avoid javascripting (and use
jquery)...
I reorganised my code and got rid of most of the js code in the template.
No
Patrick, are you developer of PHPTAL or not?
Anton
On Fri, May 30, 2008 at 5:29 PM, Patrick Burke <[EMAIL PROTECTED]> wrote:
> I love PHPTAL, and the self documentation thread going on is a very
> interesting idea. The requirement that brought up self-documentation
> seems like a development en
I love PHPTAL, and the self documentation thread going on is a very
interesting idea. The requirement that brought up self-documentation
seems like a development environment issue though, The development
environment issue seems odd to me because I would think that the core
variables needed would
On Fri, 30 May 2008 13:20:38 +0100, anru chen <[EMAIL PROTECTED]> wrote:
zend framework has a Zend_Config class, in that class, __isset is a
protected function.
so if i am pass a Zend_Config object to PHPTal, and try to do some thing
like here
PHP throws this error:
Fatal error: Call to pr
Hi :
I have searched achieves , but did not find any topics related to this problem.
I am use zend framework, PHPTal as my template engine.
function phptal_path($base, $path, $nothrow=false) in class PHPTAL_Context uses
"method_exists" to check if a method exists in a object or not.
for example
On Fri, 30 May 2008 11:12:04 +0100, Christian Welzel <[EMAIL PROTECTED]>
wrote:
Is your JavaScript is between a CDATA block ?
This does not work, because we want to use some phptal stuff in the
js code section to generate parts of the code.
As soon as i add CDATA, i get errors like this one:
Guillaume Lecanu schrieb:
Is your JavaScript is between a CDATA block ?
This does not work, because we want to use some phptal stuff in the
js code section to generate parts of the code.
As soon as i add CDATA, i get errors like this one: "Unable to find path plane"
An example of our js code
On Fri, 30 May 2008 10:19:18 +0100, Iván -DrSlump- Montes
<[EMAIL PROTECTED]> wrote:
With something like this the comment won't show up
any element can have tal:comment attribute.
and it's possible to register your own attribute or namespace in PHPTAL,
so you could have
--
regards
Le vendredi 30 mai 2008 à 11:19 +0200, Iván -DrSlump- Montes a écrit :
> Guillaume,
>
> With something like this the comment won't show up
>
>
Ok, why not.
> Anyway, PHPTAL has a pre/post filtering callback which can be used to
> remove the comments if needed.
May be it's possible to includ
You are right, we can use PHPTAL::setPreFilter(), but with something built
in it will be very useful. I always wanted to make some documentation on
templates.
Anton
On Fri, May 30, 2008 at 12:23 PM, Iván -DrSlump- Montes <
[EMAIL PROTECTED]> wrote:
> The problem with having PHPTAL generate the d
The problem with having PHPTAL generate the documentation is that some
templates might not be used often, for example one for a obscure
feature of the site, so the documentation might not be uptodate.
If you think this is what you actually need, you can use
PHPTAL::setPreFilter() to register a cal
Guillaume,
With something like this the comment won't show up
Anyway, PHPTAL has a pre/post filtering callback which can be used to
remove the comments if needed.
Iván
On Fri, May 30, 2008 at 11:03 AM, Guillaume Lecanu <[EMAIL PROTECTED]> wrote:
> Le jeudi 29 mai 2008 à 22:14 +0200, Iván -DrS
No I think the right idea is to have this documentation in XML format
directly inside template and to have PHP tal to output this documentation.
So why not to allow PHPTAL to output this documentation just like it outputs
other contents? Then developers may have access to the documentation to
alway
On Thu, 29 May 2008 20:25:51 +0100, Jason - USL
<[EMAIL PROTECTED]> wrote:
For example, if my template designer creates something like
tal:repeat="option options", my php developer would see a corresponding
line in the documentation saying that the variable 'options' needs to be
set, and it ne
Le jeudi 29 mai 2008 à 22:14 +0200, Iván -DrSlump- Montes a écrit :
> NaturalDocs [1] is a very flexible documentation system which can be
> configured to suit almost any language [2].
>
> The documentation could look something like this:
>
>
> http://www.naturaldocs.org
> [2] http://www.natura
Le jeudi 29 mai 2008 à 22:55 +0200, Christian Welzel a écrit :
> Hi there,
>
> is there a way to insert a lower than in phptal, which is printed as lower
> than in the source code?
> My problem: i have a javascript part in my template where i need a lower
> than in some cases ... ( if(foo < 0) {
On Thu, 29 May 2008 21:55:11 +0100, Christian Welzel <[EMAIL PROTECTED]>
wrote:
is there a way to insert a lower than in phptal, which is printed as
lower than in the source code?
In this case PHPTAL does what XHTML requires and escapes '<' as '<'.
This is perfectly OK and works in browse
35 matches
Mail list logo