On 25-11-2009 at 08:49:18 tarjei <tar...@nu.no> wrote:

Hi,
I think in that case best solution would be to make TALES more
powerful, but I wonder how much powerful? Should I add math
expressions? String concatenation? Should I allow passing of function
arguments? What the syntax should be like?

Maybe you can find some inspiration from the Nevows tal like template language:
http://divmod.org/trac/browser/trunk/Nevow/doc/howto/xmltemplates.xhtml

The one thing I've been wishing for more than any other is a better way to handle date formatting.

Maybe
<span tal:content="myobj/myfuncOutputtingDate/dateFormat!%d-%m%y" /> ?


This one actually can be handled with modifiers:

tal:content="date:%d-%m%y myobj/myfuncOutputtingDate"


phptal_tales_date($expr)
{
  list($format,$value) = explode(' ',$expr,2);

  return 'date("'.$format.'",'.phptal_tales($value).')';
}

--
regards, Kornel

_______________________________________________
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal

Reply via email to