Hello list,
I've modified the tal:condition attribute to handle chained
expressions so it can do stuff like cart/items | nothing or even
showItems | cart/items | nothing.
I'm attaching the whole modified file since the almost all lines have changed.
I've also noticed that phptal_isempty()
Following with the repeat discussion I've refactored the repeat
controller to add some Zope features missing from it. I've also added
support for PHP internal objects implementing Traversable (like PDO)
by traversing the object at instantiation time and storing all the
results in a temporary
I think to recall that variables in the php: modifier must be written
without the $ prefix, so your code should be something like this:
b tal:content=php: strtoupper( configItem.name )
Iván
On Mon, Apr 14, 2008 at 11:43 AM, B. Kamer [EMAIL PROTECTED] wrote:
hi
i am wondering how to do the
I don't know of any publicly available DTDs for TAL. So either you
find a validation tool which doesn't try to load external/unknown DTDs
or you create the DTDs yourself and host them somewhere.
PS: You can also create some sample data and generate the tal page
with it before handling it to the
Does something like the following work?
tal:block tal:define=global submitMsg
div i18n:translate=submit /
/tal:block
input type=submit name=submit tal:attributes=value submitMsg /
Iván
On Sat, Apr 26, 2008 at 5:58 PM, Guillaume Lecanu [EMAIL PROTECTED] wrote:
Hi,
Is it possible to
PROTECTED] wrote:
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
I think that the correct syntax for that is:
tal:condition=php: profile.profile_id GT 0
You need to use the 'php' tales modifier to evaluate an expression,
otherwise it's evaluated as a path.
Iván
On Fri, Jun 20, 2008 at 12:35 AM, Reza Sanaie [EMAIL PROTECTED] wrote:
Hi all,
Why would the
Kornel,
It might be a good idea to create a small section in the manual for
sysadmins. Explaining why compiled templates are created, ideal
permission sets, how to change the default location ...
Ivan
On Thu, Jul 31, 2008 at 4:04 PM, Alejandro Giardino
[EMAIL PROTECTED] wrote:
Hello Kornel
On Thu, Jul 31, 2008 at 6:00 PM, Kornel Lesiński
[EMAIL PROTECTED] wrote:
It's a good idea. Can you do it? :)
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 that it needs a directory to store
I think the only way to do nested structures with PHPTAL is using
Metal's macros. Have you looked at it?
Iván
On Fri, Aug 8, 2008 at 6:18 PM, Guillaume Lecanu [EMAIL PROTECTED] wrote:
Hello,
I need to make a menu, with some sub-menus and other sub-menus etc.
For example :
* Menu A :
*
Edu,
The problem is probably that PHPTAL parser doesn't know how to correctly
process the PHP ternary operator. I suggest you try using a function to
accomplish the same:
function ternary($condition, $true, $false) {
return $condition ? $true : $false;
}
table tal:attributes=class php:
prefix the content with the 'structure' keyword, it will use the value
verbatin.
script tal:content=structure myJsCode/script
ciao,
/imv
On Mon, Oct 13, 2008 at 10:13 PM, Guillaume Lecanu [EMAIL PROTECTED] wrote:
Hi,
I want to write a dynamic JS content into the script/scriptbalise.
A
I think that CDATA is special enough as to have its own handler, I mean that
it should be equivalent to 'structure'. Since TAL should output XML valid
documents, having a way to specify a CDATA section seems logical.
ie: script tal:content=cdata myJsCode/script
pre tal:content=cdata
Hi,
This is one of the cases where TAL is a bit strange to work with. The
following should work even if the HTML generated is not standards compliant.
tal:block repeat=image images
tal:block tal:replace=structure 'lt;trgt;'
tal:condition=php:repeat.image.index % 5 == 0 /
td
img
Hi Alister,
PHPTAL compiles its templates into native PHP code so the runtime overhead
is very low. I don't know much about WP's native templating engine but I
think to recall it was just some hooks (php functions) being called by the
core. In this case PHPTAL would be a tad slower but not enough
The PHPTAL way would be to create a custom tales modifier [1], although what
admirau proposes will also work.
[1] http://phptal.motion-twin.com/manual/en/split/ar06s08.html
ciao,
/imv
On Mon, Feb 2, 2009 at 6:45 PM, admirau admi...@gmail.com wrote:
W dniu 2009-02-02 18:31, Christian Welzel
It sure looks like there is a security hole in those servers, perhaps it's a
bug on some web software running in them (Wordpress, Joomla, phpMyAdmin...)
which allows the attacker to modify files writable by the web server.
Review the last modified date of the affected files and then search for
I would think so. You can however work around it by using a factory pattern,
that is, a function wich returns an instance of the object. ie:
function GuestListFactory( $param1, $param2 ){
return new GuestList( $param1, $param2 );
}
regards,
Ivan
On Tue, Feb 17, 2009 at 10:35 AM, romtek
I guess something like this should work.
input type=radio tal:attributes=checked php:P.civility eq 'Miss'
value=Miss ... /
input type=radio tal:attributes=checked php:P.civility eq 'Ms'
value=Ms ... /
input type=radio tal:attributes=checked php:P.civility eq 'Mr'
value=Mr ... /
This is one of
As a work around perhaps you can place the Javascript template code in
separate files and use them like this:
script
?php include('my_javascript_tal_template.jstal'); ?
/script
regards,
/imv
On Fri, Aug 7, 2009 at 4:28 PM, Richard Cernava cern...@gmail.com wrote:
Kornel Lesiński kor...@...
Have a look at PHP's tokenizer function token_get_all. It will give you a
rock solid base for your filter since it uses the same parser used in the
PHP engine.
regards,
/imv
On Sun, Aug 9, 2009 at 8:40 PM, Ionut Matei johnu...@gmail.com wrote:
Thank you all for your input.
I want only to
On Wed, Sep 16, 2009 at 12:23 PM, Iván -DrSlump- Montes
drsl...@pollinimini.net wrote:
Using only the autoloader/include_path might be a little limiting in my
opinion. It would make it harder to replace a standard filter class for
example.
Besides, implementing a simplified plugin loader wouldn't
Hi,
When throwing a PHPTAL_TemplateException (or a descendant of it) exception
in an environment with the Xdebug extension activated, it results in a fatal
error, triggered by Xdebug, since it checks the types of the message,
file and line properties (string, string and integer respectively).
23 matches
Mail list logo