Thanks! That worked perfectly.

===============
Jason La
jaso...@gmail.com



On Sun, Apr 26, 2009 at 12:54 PM, Miko Väli <mikov...@gmail.com> wrote:
> It's a php! modifier so you should use php syntax there.
>
> This should work:
>
> <p class="pubdate">Published <span tal:replace="php: date('A, B e, Y',
> data['publication_date'])" /></p>
>
>
>
> Jason La wrote:
>>
>> I'm trying to call the date() function in a tag, but with no luck. Any
>> help would be much appreciated.
>>
>> Assume that $data['publication_date'] is defined and sent to PHPTAL
>> througn ->set('data', $data);
>>
>> <p class="pubdate">Published <span tal:replace="php: date('A, B e, Y',
>> ${data/publication_date})" /></p>
>>
>> I'm getting:
>>
>> exception 'PHPTAL_ParserException' with message 'Invalid TALES path:
>> '$ctx->data/$ctx->publication_date', expected variable name' in
>> E:\htdocs\website\public\library\phptal\PHPTAL\Php\TalesInternal.php:164
>>
>> I tried this as well, but that doesn't work either because it is
>> looking for separate paths for both data and publication_date.
>>
>> <p class="pubdate">Published <span tal:replace="php: date('A, B e, Y',
>> data/publication_date)" /></p>
>>
>> ===============
>> Jason La
>> jaso...@gmail.com
>>
>> _______________________________________________
>> PHPTAL mailing list
>> PHPTAL@lists.motion-twin.com
>> http://lists.motion-twin.com/mailman/listinfo/phptal
>>
>
> _______________________________________________
> PHPTAL mailing list
> PHPTAL@lists.motion-twin.com
> http://lists.motion-twin.com/mailman/listinfo/phptal
>

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

Reply via email to